Skip to main content
January 25, 2012
Question

Error Using WebCharts for Pie Chart

  • January 25, 2012
  • 1 reply
  • 1710 views

I am using ColdFusion8 and I am creating a report with numerous charts and graphs with WebCharts.

The problem I am having is with pie charts. I want to be able to adjust items like the label styles.

With the bar graphs, I am simply creating the graph with WebCharts, saving the xml, and calling it in the cfchart tag (styles = "test"). No problems.

However, with pie graphs I get a "Text Outside XML:" error.

Even if I just copy the default pie xml (default_pie.xml) , rename it, and then try to call in the cfchart tag, it gives me the same error.

Any help would be appreciated.

    This topic has been closed for replies.

    1 reply

    Inspiring
    January 25, 2012

    calling it in the cfchart tag (styles = "test")

    If that is the literal code, you are missing pound signs around the #test# variable. So the charting engine thinks the xml is the word "test".

    BKBK
    Community Expert
    Community Expert
    January 27, 2012

    -==cfSearching==- wrote:

    calling it in the cfchart tag (styles = "test")

    If that is the literal code, you are missing pound signs around the #test# variable. So the charting engine thinks the xml is the word "test".

    The new rules for cfchart allow you to simply use the name(without extension) of the XML file. Crazy, but it's true.

    Inspiring
    January 27, 2012

    The new rules for cfchart allow you to simply use the name(without extension) of the XML file. Crazy, but it's true

    Maybe it should (though that sounds odd). But it did not behave that way for me. Unless I supplied an extension (or full path), the result was same invalid xml error. Add an *.xml extension, or read the file contents into a variable, and it works fine. So apparently the charting engine is not having a problem with the content, just the file path.  The Text Outside XML message may just be a red herring.  But it is an easy fix, just add a file extension and it should work fine.