我想使用带有堆积柱形图的融合图表以及面积图来显示图表。
有没有选择创建相同的?我浏览了融合图表网站,但没有发现该选项是组合图表。
以下是我的代码:
FusionCharts.ready(function () {
var salesAnlysisChart = new FusionCharts({
type: 'mscombi2D',
renderAt: 'chart-container',
width: '600',
height: '300',
dataFormat: 'json',
dataSource: {
"categories": [{
"category": [{
"label": "25 Jun - \r\n01 Jul"
},
{
"label": "02 Jul - \r\n08 Jul"
},
{
"label": "09 Jul - \r\n15 Jul"
},
{
"label": "16 Jul - \r\n22 Jul"
}]
}],
"chart": {
"showPlotBorder": "0",
"showValues": "0",
"showToolTip": "1",
"caption": "Line1",
"YAxisName": "Demand",
"showBorder": "0",
"canvasBorderThickness": "1",
"usePlotGradientColor": "0",
"showAlternateHGridColor": "0",
"showToolTipShadow": "1",
"toolTipBgAlpha": "90",
"bgColor": "#ffffff",
"canvasBorderColor": "#f2f2f2",
"xAxisName": "Timeline",
"toolTipBorderColor": "#333333",
"toolTipBgColor": "#ffffff",
"legendBorderThickness": "0",
"divLineColor": "#f2f2f2",
"legendShadow": "0"
},
"dataset": [{
"seriesname": "Five Days",
"color": "#92d3e4",
"data": [{
"value": 4262
},
{
"value": 4524
},
{
"value": 4804
},
{
"value": 4528
}]
},
{
"seriesname": "Overtime (1 Day)",
"color": "#2ea2c0",
"data": [{
"value": 1067
},
{
"value": 619
},
{
"value": 762
},
{
"value": 1009
}]
},
{
"seriesname": "Overtime (2 Days)",
"color": "#366082",
"data": [{
"value": 887
},
{
"value": 910
},
{
"value": 1152
},
{
"value": 1110
}]
},
{
"anchorHoverEffect": "1",
"seriesname": "Demand",
"showValues": "0",
"anchorRadius": "3",
"color": "#e9f057",
"data": [{
"value": 4.9E-323
},
{
"value": 4230
},
{
"value": 4230
},
{
"value": 4230
}],
"anchorHoverRadius": "5",
"parentYAxis": "S",
"renderAs": "line",
"anchorBgColor": "#e9f057"
},
{
"seriesname": "Cum. Capacity",
"color": "#2ea2c0",
"renderAs": "area",
"data": [{
"value": 4262
},
{
"value": 4566
},
{
"value": 5140
},
{
"value": 5438
}]
}],
"trendlines": [{
"line": [{
"displayValue": "5 Day Capacity",
"isTrendZone": "1",
"color": "#da433f",
"thickness": "2",
"valueOnRight": "1",
"startValue": 4468,
"valuePadding": "10",
"tooltext": "5 Day Capacity: 4468.0"
}]
}]
}
}).render();
});
柱形图未堆叠。如果我使用type ='stackedcolumn2dline',那么面积图也会堆叠起来。有办法完成这项工作吗?
任何帮助,将不胜感激。
谢谢。
是的,截至目前,您可以将stackedcolumn2dline图表作为唯一具有堆积图的组合图表,但是,您可以提出FusionCharts支持请求。
他们可以相应地帮助你。