fusioncharts:折线图给出错误

发布于 2024-11-14 11:45:56 字数 2068 浏览 2 评论 0原文

我能够绘制“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 swf,以及其他图形 swf,如 COLUMNS2S、COLUMN3D、FUNNEL 等。

有人可以指导我哪里做错了、做错了什么以及如何纠正吗?

提前致谢。

Iam able to draw graphs like "Column2D, Column3D, Bar2D, Bar3D, Funnel etc, but Iam unable to draw graphs of "Line" and "MsLine". Following is my javascript code :

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='

When I use, Line/MSLine graphs, I get following error in FIREBIG :

"uncaught exception: Chart Type Not Found!"

But when I check swf files on server, I can see LINE and MSLINE swfs, along with other graph swfs like COLUMNS2S, COLUMN3D, FUNNEL etc.

Can some one guide me where and what Iam doing wrong and how it can be rectified.

Thanks in advance

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" });

When I use, Line/MSLine graphs, I get following error in FIREBIG :

"uncaught exception: Chart Type Not Found!"

But when I check swf files on server, I can see LINE and MSLINE swfs, along with other graph swfs like COLUMNS2S, COLUMN3D, FUNNEL etc.

Can some one guide me where and what Iam doing wrong and how it can be rectified.

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

秋叶绚丽 2024-11-21 11:45:56

您能够成功绘制任何图表吗?

我也不相信你的 XML 是有效的。请参阅FusionCharts 支持论坛 对于相关的 XSD。我之前没有使用 JavaScript 创建 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>     

Have you been able to successfuly plot any charts?

I'm also not convinced your XML is valid. Please see the FusionCharts Support Forum for the relevant XSDs. I haven't created FusionCharts usign JavaScript before but the following is valid 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>     
方圜几里 2024-11-21 11:45:56

请使用名称 line2dmsline2d 尝试一次。

以下是可接受的图表类型列表:

        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

Please try once using the name line2d and msline2d.

Here is the list of acceptable chart types:

        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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文