Highstock - Scrollbar不会出现

时间:2015-07-27 10:16:57

标签: scrollbar highstock

我有问题,因为在我的网站上没有出现图表下方的进度条。我尝试使用highstock但有些东西不起作用。你知道是什么原因引起的吗?也许我需要安装一些东西?我花了很多时间在上面,我不知道会出现什么问题。 代码:

    <head>
  <script type="text/javascript">
  $(function () {
     $('#container').highcharts({
        chart: {
          type: 'spline',
          zoomType: 'x'
      },
      credits: {
      text: 'XML Feed',
      href: 'utlfeed.aspx?campus=PR&room=B325'
    },
      title: {
          text:   'PR-B325 Room Utilization',
          x: -20 //center
      },
      subtitle: {
      text:   'Source: FreePC',
          x: -20
      },
      xAxis: {
          type: 'datetime',
          maxZoom: 7 * 24 * 3600000,
          tickInterval: 24 * 3600 * 1000,
          minTickInterval: 60 * 1000,
          minRange: 900 * 1000
      },
      yAxis: {
          title: {
          text:   'Availability'
          },
          min: 0,
          plotLines: [{
              value: 0,
              width: 1,
              color:  '#808080'
          }]
      },
      tooltip: {
          valueSuffix:  ' PCs'
      },
      legend: {
              layout:  'vertical',
              align:  'right',
              verticalAlign:  'middle',
              borderWidth: 0
      },
      scrollbar: {
          enabled: true
      },
      series: [{
          name:   'Available',
          color: '#00FF00',
          data: [[Date.UTC(2013,  9, 16, 6, 0), 1],[Date.UTC(2013,  9, 17, 6, 5), 2],[Date.UTC(2013,  9, 18, 6, 10), 3],[Date.UTC(2013,  9, 19, 6, 15), 4],[Date.UTC(2013,  9, 20, 6, 20), 5],[Date.UTC(2013,  9, 21, 6, 25), 6],[Date.UTC(2013,  9, 22, 6, 30), 7],[Date.UTC(2013,  9, 23, 6, 35), 8],[Date.UTC(2013,  9, 24, 6, 40), 9],[Date.UTC(2013,  9, 25, 6, 45), 10],[Date.UTC(2013,  9, 26, 6, 50), 11],[Date.UTC(2013,  9, 27, 6, 55), 12]]
      }, {
          name:   'Unavailable',
          color: '#FF0000',
          pointInterval: 24 * 3600 * 1000,
          pointStart: Date.UTC(2013, 9, 17),
          data: [[Date.UTC(2013,  9, 16, 6, 0), 21],[Date.UTC(2013,  9, 17, 6, 5), 22],[Date.UTC(2013,  9, 18, 6, 10), 23],[Date.UTC(2013,  9, 19, 6, 15), 24],[Date.UTC(2013,  9, 20, 6, 20), 25],[Date.UTC(2013,  9, 21, 6, 25), 26],[Date.UTC(2013,  9, 22, 6, 30), 27],[Date.UTC(2013,  9, 23, 6, 35), 28],[Date.UTC(2013,  9, 24, 6, 40), 29],[Date.UTC(2013,  9, 25, 6, 45), 30],[Date.UTC(2013,  9, 26, 6, 50), 31],[Date.UTC(2013,  9, 27, 6, 55), 32]]
      }]
  });
});
  </script>
</head>

<body> 
 <script src="http://code.highcharts.com/stock/highstock.js"></script>
    <script src="http://code.highcharts.com/stock/modules/exporting.js"></script>
    <div id="container" style="min-width: 600px; height: 400px; margin: 0 auto" align="right"></div>
</body>

0 个答案:

没有答案