2013-08-29 57 views
1

我做highcharts汽油罐(信用卡预付款)highcharts溢出分组

我想使每行应该从棒替代分组末(加入)的从头开始。(我不吨需要拥有所有数据的总和)

enter image description here

感谢。

![var options = { 
       chart: { 
        type: 'bar', 
        height: 300, 
        width:420 
       }, 
       title: { 
        text: 'Prepayment' 
       }, 
       yAxis: { 
        gridLineColor: '#eee', 
        title: { 
         text: 'Prepayment' 
        } 
       }, 
       xAxis: { 
        categories: \['Credit'\], 
        labels: { 
         step: 0, 
         rotation: -45, 
         align: 'right' 
        } 
       }, 
       legend: { 
        enabled: true 
       }, 
       tooltip: { 
        shared: true, 
        crosshairs: true 
       }, 
       plotOptions: { 
        series: { 
         stacking: 'normal' 
        } 
       }, 
       credits: { 
        enabled: false 
       }, 
       series: \[{ 
        color:'#89C35C', 
        name: 'Current Credit', 
        data: \[10\]    }, { 
        color:'#FFD801', 
        name: 'Warning Threshold', 
        data: \[5\]    }, { 
        color:'#E42217', 
        name: 'Cut-Off Threshold', 
        data: \[1\]    }\], 
      }; 
$('#container').highcharts(options);][1] 

例子: http://jsfiddle.net/2se5q/

+0

你需要禁用堆积选项 –

回答

1

我做了这个样子,其中type =面积

http://jsfiddle.net/2se5q/4/

enter image description here

var options = { 
       chart: { 
        type: 'area', 
        height: 300, 
        width:420 
       }, 
       title: { 
        text: 'Prepayment' 
       }, 
       yAxis: { 
        gridLineColor: '#eee', 
        title: { 
         text: 'Prepayment' 
        } 
       }, 
       xAxis: { 
        categories: ['Credit'], 
        labels: { 
         step: 0, 
         rotation: -45, 
         align: 'right' 
        } 
       }, 
       legend: { 
        enabled: true 
       }, 
       tooltip: { 
        shared: true, 
        crosshairs: true 
       }, 
       plotOptions: { 
        series: { 
         stacking: 'normal' 
        } 
       }, 
       credits: { 
        enabled: false 
       }, 
       series: [{ 
        color:'#89C35C', 
        name: 'Current Credit', 
        data: [10,10]    }, { 
        color:'#FFD801', 
        name: 'Warning Threshold', 
        data: [5,5]    }, { 
        color:'#E42217', 
        name: 'Cut-Off Threshold', 
        data: [1,1]    }], 
      }; 
$('#container').highcharts(options); 
2

,你会发现所有这些链接http://api.highcharts.com/highcharts 的解释,回答你的问题,如果你只删除“plotOptions:”你不会找到比图形的总和上一条线,但从0

这里开始:http://jsfiddle.net/2se5q/3/

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

我需要把它在一个行,而不是分开的线 – Oyeme