我能够绘制像“Column2D,Column3D,Bar2D,Bar3D,Funnel等”的图形,但是我无法绘制“Line”和“MsLine”的图形。以下是我的javascript代码:
jQuery('#myChartContainer').insertFusionCharts({
swfPath: base_url+'resource/js/Charts/',
width : '400',
height: '500',
type: "MSLine",
chartRightMargin: '20',
data: "<graph caption='Monthly Sales Summary'
subcaption='For the year 2004'
xAxisName='Month'
yAxisMinValue='15000'
yAxisName='Sales'
numberPrefix='$'
showNames='1'
showValues='0'
rotateNames='0'
showColumnShadow='1'
animation='1'
showAlternateHGridColor='1'
AlternateHGridColor='ff5904'
divLineColor='ff5904'
divLineAlpha='20'
alternateHGridAlpha='5'
canvasBorderColor='666666'
baseFontColor='666666'>
<set name='Jan' value='17400' hoverText='January'/>
<set name='Feb' value='19800' hoverText='February'/>
<set name='Mar' value='21800' hoverText='March'/>
<set name='Apr' value='23800' hoverText='April'/>
<set name='May' value='29600' hoverText='May'/>
<set name='Jun' value='27600' hoverText='June'/>
<set name='Jul' value='31800' hoverText='July'/>
<set name='Aug' value='39700' hoverText='August'/>
<set name='Sep' value='37800' hoverText='September'/>
<set name='Oct' value='21900' hoverText='October'/>
<set name='Nov' value='32900' hoverText='November' />
<set name='Dec' value='39800' hoverText='December' />
</graph>",
dataFormat: "XMLData",
wMode: "transparent"
});
当我使用Line / MSLine图表时,我在FIREBIG中收到以下错误:
“未捕获的异常:找不到图表类型!”
但是当我检查服务器上的swf文件时,我可以看到LINE和MSLINE swfs,以及其他图形swfs,如COLUMNS2S,COLUMN3D,FUNNEL等。
有人可以指导我在哪里以及我做错了什么以及如何纠正它。
提前致谢
答案 0 :(得分:0)
您是否能够成功绘制任何图表?
我也不相信你的XML是有效的。有关相关XSD,请参阅FusionCharts Support Forum。我之前没有创建过FusionCharts,但是以下是有效的xml:
<chart>
<categories>
<category label='Jan'>
<category label='Feb'>
<category label='Mar'>
<category label='Apr'>
<category label='May'>
<category label='Jun'>
<category label='Jul'>
<category label='Aug'>
<category label='Sep'>
<category label='Oct'>
<category label='Nov'>
<category label='Dec'>
</categories>
<dataset>
<set value='17400' hoverText='January'/>
<set value='19800' hoverText='February'/>
<set value='21800' hoverText='March'/>
<set value='23800' hoverText='April'/>
<set value='29600' hoverText='May'/>
<set value='27600' hoverText='June'/>
<set value='31800' hoverText='July'/>
<set value='39700' hoverText='August'/>
<set value='37800' hoverText='September'/>
<set value='21900' hoverText='October'/>
<set value='32900' hoverText='November' />
<set value='39800' hoverText='December' />
</dataset>
</chart>
答案 1 :(得分:0)
请使用名称line2d
和msline2d
尝试一次。
以下是可接受的图表类型列表:
area2d
bar2d
bubble
candlestick
column2d
column3d
donut2d
donut3d
doughnut2d
doughnut3d
dragarea
dragcolumn2d
dragline
dragnode
drawingpad
errorbar2D
exportcomponent
funnel
gantt
horizontalbullet
inversearea2d
inversecolumn2d
inverseline2d
kagi
line2d
logcolumn2d
logline2d
msarea2d
msbar2d
msbar3d
mscolumn2d
mscolumn3d
mscolumn3dline
mscolumn3dlinedy
mscombi2d
mscombi3d
mscombidy2d
msline2d
msspline2d
mssplinearea2d
msstackedcolumn2d
msstackedcolumn2dlinedy
multiaxisline
multilevelpie
pie2d
pie3d
pyramid
radar
realtimeangular
realtimearea
realtimebulb
realtimecolumn
realtimecylinder
realtimehorizontalled
realtimehorizontallinear
realtimeline
realtimestackedarea
realtimestackedcolumn
realtimethermometer
realtimeverticalled
scatter
scrollarea2d
scrollcolumn2d
scrollcombi2d
scrollcombidy2d
scrollline2d
scrollstackedcolumn2d
selectscatter
sparkcolumn
sparkline
sparkwinloss
spline2d
splinearea2d
ssgrid
stackedarea2d
stackedbar2d
stackedbar3d
stackedcolumn2d
stackedcolumn3d
stackedcolumn3dlinedy
verticalbullet
waterfall