2012-03-12 38 views
1

堆疊列這裏是我到目前爲止有:我試圖創建一個時間序列圖已經在HighCharts

$(document).ready(function() { 

    var options = { 
     chart: { 
      renderTo: 'container', 
      zoomType: 'x', 
      spacingRight: 20, 
      defaultSeriesType: 'column' 
     }, 
     title: { 
      text: 'Job Postings by Distribution' 
     }, 
     xAxis: { 
      title: { 
       text: 'Date' 
      }, 
      type: 'datetime' 
     }, 
     yAxis: { 
      title: { 
       text: 'Job Postings' 
      } 
     }, 
     credits: { 
      enabled: false 
     }, 
     series: [{ 
      name: 'Dice', 
      data: [ 
       [1327899600000, 7], 
       [1327986000000, 11], 
       [1328072400000, 7] 
      ] 
     }, 
     { 
      name: 'Career Builder', 
      data: [ 
       [1327899600000, 7], 
       [1327986000000, 11], 
       [1328072400000, 7] 
      ] 
     }] 
    } 

    var chart = new Highcharts.Chart(options); 
}) 

我想對於一個給定的時間從「骰子」和堆棧的數據每列Career Builder'發行版。但是我的圖表沒有顯示任何內容。數據中的第一項是毫秒。第二項是分發到骰子或事業建造工作職位的數量,

回答

4

從配置中缺少的東西是設置堆疊到'normal'

plotOptions: { 
    series: { 
     stacking: 'normal' 
    } 
} 

全部例如在jsfiddle

截圖: enter image description here

相關問題