FusionChart使用点滴
去除背景颜色:
"bgColor":"FFFFFF",
"showBorder":"0"
formatNumber 逗号来分隔数字(千位,百万位),默认为1(True);若取0,则不加分隔符
formatNumberScale 是否格式化数字,默认为1(True),自动的给你的数字加上K(千)或M(百万);若取0,则不加K或M
set元素
borderColor 边框颜色
isSliced 被切开
label [label]
value 值
color 颜色
link 链接(FusionCharts链接格式)
toolText 自定义提示
var xdwsChar = new FusionCharts("../fusionCharts/MSColumn2D.swf", "xdwsCharId", "100%", "360", "0", "0");
xdwsChar.setJSONData(new ChartConverter( ret.data.gasValue,{
"trendlines":{
"line":[
{"startvalue":ret.data.bzx,"color":"F0794B",
"thickness":"2","alpha":"100","showontop":"1","dashed":"1","dashGap":"5","displayvalue":"高瓦斯标准线"}
]
},
"caption": xdwsCaption,
series: [
{label: 'dwmc', value: 'ycl',link: function (dat) {
return 'javascript:antigasLink("'+dat.dwid+'","'+dat.dwmc+'","'+pLx+'")'
}}
]
}).ToSeriesData());
xdwsChar.render("chartXD");
"useroundedges": "1", 3D效果
//采掘分析
series:[
{name:'日推进(米)', label:'rq',value:'jc'},
{name:'日平均(米)', label:'rq',value:'avgjc',style:{drawAnchors:0,color:'#ff0000',dashed: '1' }}
]
//平均值
"trendlines":{
"line":[{
"startvalue":"26000",
"color":"91C728",
"displayvalue":"Target",
"showontop":"1"
}
]
}
参考URL:
http://blog.csdn.net/zelda002/article/details/6637802
http://www.fusioncharts.com/support/documentation/
http://www.fusioncharts.com/demos/business/#kpi-dashboard
http://docs.fusioncharts.com/widgets/
var char1 = new FusionCharts("../fusionCharts/MSColumn2D.swf", "myChartId1", "100%", "360", "0", "0");
char1.setJSONData(new ChartConverter(data.hcl, {
"caption":fbrq + "各矿采区回采率对比分析",
"trendlines":{
"line":[
{"startvalue":data.pjz,"color":"F0794B",
"thickness":"2","alpha":"100","showontop":"1","dashed":"1","dashGap":"5","displayvalue":"平均值"},
{"startvalue":data.gskh,"color":"F0794B",
"thickness":"2","alpha":"100","showontop":"1","dashed":"1","dashGap":"5","displayvalue":"公司考核"},
{"startvalue":data.ljzpjz,"color":"F0794B",
"thickness":"2","alpha":"100","showontop":"1","dashed":"1","dashGap":"5","displayvalue":"累计平均值"}
]
},
series: [
{name: '当月回采率', color: "6AB5F0", label: 'dwmc',value: 'hcl', link: function (dat) {
return 'javascript:setHclData("'+dat.dwId+'","'+fbrq.replace("年","-").replace("月","-")+'")'
}},
{name: '累计回采率', color: "F0794B", label: 'dwmc',value: 'ljz', link: function (dat) {
return 'javascript:setHclData("'+dat.dwId+'","'+fbrq.replace("年","-").replace("月","-")+'")'
}}
]
}).ToSeriesData(ColumnChartStyle));