Вход Регистрация
Файл: admin/skins/lib/flot/examples/percentiles.html
Строк: 81
<?php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<
html>
 <
head>
    <
meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <
title>Flot Examples</title>
    <
link href="layout.css" rel="stylesheet" type="text/css">
    <!--[if 
lte IE 8]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]-->
    <
script language="javascript" type="text/javascript" src="../jquery.js"></script>
    <
script language="javascript" type="text/javascript" src="../jquery.flot.js"></script>
    <
script language="javascript" type="text/javascript" src="../jquery.flot.fillbetween.js"></script>
 </
head>
    <
body>
    <
h1>Flot Examples</h1>

    <
div id="placeholder" style="width:600px;height:400px;"></div>

    <
p>Height in centimeters of individuals from the US (2003-2006) as function of
    age in years 
(source: <a href="http://www.cdc.gov/nchs/data/nhsr/nhsr010.pdf">CDC</a>).
    
The 15%-85%, 25%-75% and 50percentiles are indicated.</p>

    <
p>For each point of a filled curveyou can specify an arbitrary
    bottom
. As this example illustratesthis can be useful for
    
plotting percentiles. If you have the data sets available without
    appropriate fill bottoms
you can use the fillbetween plugin to
    compute the data point bottoms automatically
.</p>
    
<
script type="text/javascript">
$(function () {
    var 
males = {'15%': [[288.0], [393.3], [4102.0], [5108.5], [6115.7], [7115.6], [8124.6], [9130.3], [10134.3], [11141.4], [12146.5], [13151.7], [14159.9], [15165.4], [16167.8], [17168.7], [18169.5], [19168.0]], '90%': [[296.8], [3105.2], [4113.9], [5120.8], [6127.0], [7133.1], [8139.1], [9143.9], [10151.3], [11161.1], [12164.8], [13173.5], [14179.0], [15182.0], [16186.9], [17185.2], [18186.3], [19186.6]], '25%': [[289.2], [394.9], [4104.4], [5111.4], [6117.5], [7120.2], [8127.1], [9132.9], [10136.8], [11144.4], [12149.5], [13154.1], [14163.1], [15169.2], [16170.4], [17171.2], [18172.4], [19170.8]], '10%': [[286.9], [392.6], [499.9], [5107.0], [6114.0], [7113.5], [8123.6], [9129.2], [10133.0], [11140.6], [12145.2], [13149.7], [14158.4], [15163.5], [16166.9], [17167.5], [18167.1], [19165.3]], 'mean': [[291.9], [398.5], [4107.1], [5114.4], [6120.6], [7124.7], [8131.1], [9136.8], [10142.3], [11150.0], [12154.7], [13161.9], [14168.7], [15173.6], [16175.9], [17176.6], [18176.8], [19176.7]], '75%': [[294.5], [3102.1], [4110.8], [5117.9], [6124.0], [7129.3], [8134.6], [9141.4], [10147.0], [11156.1], [12160.3], [13168.3], [14174.7], [15178.0], [16180.2], [17181.7], [18181.3], [19182.5]], '85%': [[296.2], [3103.8], [4111.8], [5119.6], [6125.6], [7131.5], [8138.0], [9143.3], [10149.3], [11159.8], [12162.5], [13171.3], [14177.5], [15180.2], [16183.8], [17183.4], [18183.5], [19185.5]], '50%': [[291.9], [398.2], [4106.8], [5114.6], [6120.8], [7125.2], [8130.3], [9137.1], [10141.5], [11149.4], [12153.9], [13162.2], [14169.0], [15174.8], [16176.0], [17176.8], [18176.4], [19177.4]]};
    var 
females = {'15%': [[284.8], [393.7], [4100.6], [5105.8], [6113.3], [7119.3], [8124.3], [9131.4], [10136.9], [11143.8], [12149.4], [13151.2], [14152.3], [15155.9], [16154.7], [17157.0], [18156.1], [19155.4]], '90%': [[295.6], [3104.1], [4111.9], [5119.6], [6127.6], [7133.1], [8138.7], [9147.1], [10152.8], [11161.3], [12166.6], [13167.9], [14169.3], [15170.1], [16172.4], [17169.2], [18171.1], [19172.4]], '25%': [[287.2], [395.9], [4101.9], [5107.4], [6114.8], [7121.4], [8126.8], [9133.4], [10138.6], [11146.2], [12152.0], [13153.8], [14155.7], [15158.4], [16157.0], [17158.5], [18158.4], [19158.1]], '10%': [[284.0], [391.9], [499.2], [5105.2], [6112.7], [7118.0], [8123.3], [9130.2], [10135.0], [11141.1], [12148.3], [13150.0], [14150.7], [15154.3], [16153.6], [17155.6], [18154.7], [19153.1]], 'mean': [[290.2], [398.3], [4105.2], [5112.2], [6119.0], [7125.8], [8131.3], [9138.6], [10144.2], [11151.3], [12156.7], [13158.6], [14160.5], [15162.1], [16162.9], [17162.2], [18163.0], [19163.1]], '75%': [[293.2], [3101.5], [4107.9], [5116.6], [6122.8], [7129.3], [8135.2], [9143.7], [10148.7], [11156.9], [12160.8], [13163.0], [14165.0], [15165.8], [16168.7], [17166.2], [18167.6], [19168.0]], '85%': [[294.5], [3102.8], [4110.4], [5119.0], [6125.7], [7131.5], [8137.9], [9146.0], [10151.3], [11159.9], [12164.0], [13166.5], [14167.5], [15168.5], [16171.5], [17168.0], [18169.8], [19170.3]], '50%': [[290.2], [398.1], [4105.2], [5111.7], [6118.2], [7125.6], [8130.5], [9138.3], [10143.7], [11151.4], [12156.7], [13157.7], [14161.0], [15162.0], [16162.8], [17162.2], [18162.8], [19163.3]]};

    var 
dataset = [
       { 
label'Female mean'datafemales['mean'], lines: { showtrue }, color"rgb(255,50,50)" },
       { 
id'f15%'datafemales['15%'], lines: { showtruelineWidth0fillfalse }, color"rgb(255,50,50)" },
       { 
id'f25%'datafemales['25%'], lines: { showtruelineWidth0fill0.2 }, color"rgb(255,50,50)"fillBetween'f15%' },
       { 
id'f50%'datafemales['50%'], lines: { showtruelineWidth0.5fill0.4shadowSize}, color"rgb(255,50,50)"fillBetween'f25%' },
       { 
id'f75%'datafemales['75%'], lines: { showtruelineWidth0fill0.4 }, color"rgb(255,50,50)"fillBetween'f50%' },
       { 
id'f85%'datafemales['85%'], lines: { showtruelineWidth0fill0.2 }, color"rgb(255,50,50)"fillBetween'f75%' },
       
       { 
label'Male mean'datamales['mean'], lines: { showtrue }, color"rgb(50,50,255)" },
       { 
id'm15%'datamales['15%'], lines: { showtruelineWidth0fillfalse }, color"rgb(50,50,255)" },
       { 
id'm25%'datamales['25%'], lines: { showtruelineWidth0fill0.2 }, color"rgb(50,50,255)"fillBetween'm15%' },
       { 
id'm50%'datamales['50%'], lines: { showtruelineWidth0.5fill0.4shadowSize}, color"rgb(50,50,255)"fillBetween'm25%' },
       { 
id'm75%'datamales['75%'], lines: { showtruelineWidth0fill0.4 }, color"rgb(50,50,255)"fillBetween'm50%' },
       { 
id'm85%'datamales['85%'], lines: { showtruelineWidth0fill0.2 }, color"rgb(50,50,255)"fillBetween'm75%' }
    ]

    $.
plot($("#placeholder"), dataset, {
            
xaxis: { tickDecimals},
            
yaxis: { tickFormatter: function (v) { return " cm"; } },
            
legend: { position'se' }
        });
});
</
script>

 </
body>
</
html>
?>
Онлайн: 1
Реклама