我必须绘制30天数据的融合图表。但由于数据点过多,滚动条即将出现。所以我只想绘制每个第n个标签。为了减少我的x轴尺寸。
融合图表代码在这里:
var ecuChart = new FusionCharts({
//type: 'mscolumn3d',
type: 'scrollline2d',
//type: 'msarea',
renderAt: 'ecuGraphBody',
width: "265",
height: "100%",
dataFormat: "json",
dataSource: {
"chart": {
"subcaption": "Graph",
"xAxisname": "day",
"yAxisName": " $/Hour",
"numvisibleplot": "24",
"animation":"1",
"decimals":"2",
"showLegend": "1",
"numberprefix": "$",
"legendPosition": "bottom",
"legendIconScale":"1",
"theme":"fint",
"legendshadow": "0",
"exportenabled": "1",
"legendborderalpha": "0",
//"palettecolors": "#f8bd19,#008ee4,#33bdda,#e44a00,#6baa01,#583e78",
"showborder": "0",
"showValues": "1",
"labelStep" :"4"
},
"categories": [
{
"category": categories
}
],
"dataset": [
{
"data": graphdata
}
]
}
}).render();
graphdata: [
{
"value": "15123"
},
{
"value": "14233"
},
{
"value": "23507"
},
{
"value": "9110"
},
{
"value": "15529"
},
{
"value": "20803"
},
{
"value": "19202"
}
.
.
.
]
categories : [
{
"label": "1"
},
{
"label": "2"
},
{
"label": "3"
},
{
"label": "4"
},
{
"label": "5"
},
{
"label": "6"
},
{
"label": "7"
}
.
.
.
.
{
"label": "30"
}]