输出页面js格式
var myChart = new FusionCharts("MSLine2.swf", "myChartId", 730, 400, 0, 1); var chart = "{ 'chart': { 'borderColor': 'ffffff', 'showAboutMenuItem': '0', 'bgColor': 'ffffff', 'linethickness': '1', 'showvalues': '0', 'formatnumberscale': '0', 'anchorradius': '2', 'divlinealpha': '20', 'divlinecolor': 'CC3300', 'divlineisdashed': '1', 'showalternatehgridcolor': '1', 'alternatehgridcolor': 'CC3300', 'shadowalpha': '40', 'labelstep': '2', 'numvdivlines': '5', 'chartrightmargin': '35', 'bgangle': '270', 'bgalpha': '10,10', 'alternatehgridalpha': '5', 'legendposition': 'RIGHT ', 'baseFontSize': '12', 'yAxisMinValue':' 40', 'yAxisMaxValue': '150', 'labelStep': '3' }, 'categories': [ { 'category': //与 { 'value': '0'}, { 'value': '0'}的个数相同
[ { 'label': '1' }, { 'label': '2' } ] }], 'dataset': [ //可以动态替换数据
{ 'seriesname': '收缩压', 'color': '15ae00', 'anchorbordercolor': '15ae00', 'data': [ { 'value': '0'}, { 'value': '0'} ] }, { 'seriesname': '吸附压', 'color': '15ae00', 'anchorbordercolor': '15ae00', 'data': [ { 'value': '0'}, { 'value': '0'} ] } //结束动态替换数据
], 'styles': { 'definition': [ { 'name': 'CaptionFont', 'type': 'font', 'size': '12' } ], 'application': [ { 'toobject': 'CAPTION', 'styles': 'CaptionFont' }, { 'toobject': 'SUBCAPTION', 'styles': 'CaptionFont' } ] } } ] }"; chart = eval('(' + chart + ')'); myChart.setJSONData(chart); myChart.render("flashChat2");