Вход Регистрация
Файл: public_html/admin/vendors/flot/examples/series-errorbars/index.html
Строк: 71
<?php
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<
html>
<
head>
    <
meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <
title>Flot ExamplesError Bars</title>
    <
link href="../examples.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.errorbars.js"></script>
    <
script language="javascript" type="text/javascript" src="../../jquery.flot.navigate.js"></script>
    <
script type="text/javascript">

    $(function() {

        function 
drawArrow(ctxxyradius){
            
ctx.beginPath();
            
ctx.moveTo(radiusradius);
            
ctx.lineTo(xy);
            
ctx.lineTo(radiusradius);
            
ctx.stroke();
        }

        function 
drawSemiCircle(ctxxyradius){
            
ctx.beginPath();
            
ctx.arc(xyradius0Math.PIfalse);
            
ctx.moveTo(radiusy);
            
ctx.lineTo(radiusy);
            
ctx.stroke();
        }

        var 
data1 = [
            [
1,1,.5,.1,.3],
            [
2,2,.3,.5,.2],
            [
3,3,.9,.5,.2],
            [
1.5,-.05,.5,.1,.3],
            [
3.15,1.,.5,.1,.3],
            [
2.5,-1.,.5,.1,.3]
        ];

        var 
data1_points = {
            
showtrue,
            
radius5,
            
fillColor"blue"
            
errorbars"xy"
            
xerr: {showtrueasymmetrictrueupperCap"-"lowerCap"-"}, 
            
yerr: {showtruecolor"red"upperCap"-"}
        };

        var 
data2 = [
            [
.7,3,.2,.4],
            [
1.5,2.2,.3,.4],
            [
2.3,1,.5,.2]
        ];

        var 
data2_points = {
            
showtrue,
            
radius5,
            
errorbars"y"
            
yerr: {show:trueasymmetric:trueupperCapdrawArrowlowerCapdrawSemiCircle}
        };

        var 
data3 = [
            [
1,2,.4],
            [
2,0.5,.3],
            [
2.7,2,.5]
        ];

        var 
data3_points = {
            
//do not show points
            
radius0,
            
errorbars"y"
            
yerr: {show:trueupperCap"-"lowerCap"-"radius5}
        };

        var 
data4 = [
            [
1.31],
            [
1.752.5],
            [
2.50.5]
        ];

        var 
data4_errors = [0.10.40.2];
        for (var 
0data4.lengthi++) {
            
data4_errors[i] = data4[i].concat(data4_errors[i])
        }

        var 
data = [
            {
color"blue"pointsdata1_pointsdatadata1label"data1"}, 
            {
color"red",  pointsdata2_pointsdatadata2label"data2"},
            {
color"green"lines: {showtrue}, pointsdata3_pointsdatadata3label"data3"},
            
// bars with errors
            
{color"orange"bars: {showtruealign"center"barWidth0.25}, datadata4label"data4"},
            {
color"orange"pointsdata3_pointsdatadata4_errors}
        ];

        $.
plot($("#placeholder"), data , {
            
legend: {
                
position"sw",
                
showtrue
            
},
            
series: {
                
lines: {
                    
showfalse
                
}
            },
            
xaxis: {
                
min0.6,
                
max3.1
            
},
            
yaxis: {
                
min0,
                
max3.5
            
},
            
zoom: {
                
interactivetrue
            
},
            
pan: {
                
interactivetrue
            
}
        });

        
// Add the Flot version string to the footer

        
$("#footer").prepend("Flot " + $.plot.version " &ndash; ");
    });

    </
script>
</
head>
<
body>

    <
div id="header">
        <
h2>Error Bars</h2>
    </
div>

    <
div id="content">

        <
div class="demo-container">
            <
div id="placeholder" class="demo-placeholder"></div>
        </
div>

        <
p>With the errorbars plugin you can plot error bars to show standard deviation and other useful statistical properties.</p>

    </
div>

    <
div id="footer">
        
Copyright &copy2007 2013 IOLA and Ole Laursen
    
</div>

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