2013-05-03 220 views
0

我們可以用高爐做氣泡圖嗎?如果是的,我需要幫助,請,因爲我做到這一點,但沒有奏效:高爐氣泡圖

 $(function() { 
     $('#container').highcharts('StockChart',{ 

      chart: { 
       type: 'bubble', 

      }, 

      title: { 
       text: 'Highcharts Bubbles' 
      }, 

      series: [{ 
       data: [[Date.UTC(1970, 9, 27),97,36,79], 
       [Date.UTC(1970, 10, 10),94,74,60], 
       [Date.UTC(1970, 10, 18),68,76,58], 
       ] 
      }] 

     }); 
     }); 

謝謝

回答

5

您必須使用:

<script src="http://code.highcharts.com/stock/highstock.js"></script> 
<script src="http://code.highcharts.com/highcharts-more.js"></script> 

的jsfiddle:http://jsfiddle.net/b826C/7/

$(function() { 
    var chart = new Highcharts.Chart({ 

     chart: { 
      renderTo: 'container', 
      type: 'bubble' 
     }, 
     scrollbar: { 
      enabled: true 
     }, 
     navigator:{ 
      enabled:true 
     }, 
     rangeSelector: { 
      enabled:true 
     }, 
     series: [{ 
      name: 'Bubble Highstock', 
      data: [[Date.UTC(1970, 9, 27),36,79],[Date.UTC(1970, 10, 10),74,60],[Date.UTC(1970, 12, 20),76,58]] 
     }] 
    }); 
}); 
+2

'highcharts-more.js'的正確網址是'http:// code.highcharts.com/stock/highcharts-more.js'。這將確保它與給定的Highstock版本正常工作。所有網址都列在http://code.highcharts.com/上。 – 2014-05-07 14:09:53