Viewing File: /usr/local/cpanel/base/jqplot/dist/examples/samey.html

<!DOCTYPE html>

<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Simple Test</title>
  <!--[if IE]><script language="javascript" type="text/javascript" src="../excanvas.js"></script><![endif]-->

  <link rel="stylesheet" type="text/css" href="../jquery.jqplot.css" />
  <link rel="stylesheet" type="text/css" href="examples.css" />

  <!-- BEGIN: load jquery -->
  <script language="javascript" type="text/javascript" src="../jquery-1.3.2.min.js"></script>
  <!-- END: load jquery -->

  <!-- BEGIN: load jqplot -->
  <script language="javascript" type="text/javascript" src="../jquery.jqplot.js"></script>
  <script language="javascript" type="text/javascript" src="../plugins/jqplot.highlighter.js"></script>
  <!-- END: load jqplot -->
  <style type="text/css" media="screen">
    .jqplot-axis {
      font-size: 0.85em;
    }
  </style>
  <script type="text/javascript" language="javascript">

  $(document).ready(function(){
    ideal = [ 178.0,168.111111111,158.222222222,148.333333333,138.444444444,128.555555556,118.666666667,108.777777778,98.8888888889,89.0,79.1111111111,69.2222222222,59.3333333333,49.4444444444,39.5555555556,29.6666666667,19.7777777778,9.88888888889,0.0 ];
    hours = [ 178.00,148.00,148.00,129.00,122.00,114.00,114.00,77.00,74.00,74.00,58.00,58.00,58.00,26.00,26.00,26.00,26.00,26.00,26.00 ];
    storypoints = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ];

    // jqplot currently can't handle series that have all the
    // same datapoints
    p = storypoints[0];
    bug = true;
    for (i in storypoints) {
        if (storypoints[i] != p) {
            bug = false;
            break;
        }
    }
    bug = false;
    if (bug) {
        storypoints = hours.slice();
        pmax = 178.00;
    } else {
        pmax = 0.1;
    }

    plot1 = $.jqplot('graph', [ideal, storypoints, hours], {
        legend:{show:true, location:'sw'},
        grid:{shadow:false},
        seriesDefault:{shadow:false},
        series:[
            {label: 'Ideal', yaxis: 'yaxis'},
            {label: 'Points', yaxis:'y2axis'},
            {label: 'Hours', yaxis: 'yaxis'}
            ],
        axes:{
            xaxis:{min:1, max:19, tickInterval:1, tickOptions:{formatString:'%d'}},
            y2axis:{min:1, max:1.1, tickOptions:{formatString:'%d'}},
            yaxis:{min:0, max:178.00 * 1.01, tickOptions:{formatString:'%d'}}
            },
        highlighter:{
            tooltipAxes: 'y',
            formatString: '%s'
        }
    });

  });
  </script>
  </head>
  <body>
  <?php include "nav.inc"; ?>
    <div id="graph" style="margin-top:20px; margin-left:20px; width:500px; height:300px;"></div>
  </body>
</html>
Back to Directory File Manager