2012-03-12 67 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

相关问题