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".

    January 26, 2012

    test is the name of the xml file. (test.xml)

    This works for a bar graph. You will see I have style="Veggies". The name of the xml file I am using for that bar chart is called Veggies.xml. I have 6 bar charts using 6 different xml files working this way with no problem :

    <cfchart 




    format="png" 



    xaxistitle="" 



    yaxistitle="Participating Residents" 



    chartheight="500" 



    chartwidth="600" 



    scalefrom="0"



    scaleto="#commVeggies.recordcount#"



    font="arial"



    fontsize="16"



    xoffset="0.05" yoffset="0.05"



    show3d = "no"



    fontBold ="yes"



    style="Veggies"



    >

    But the same format does NOT work for pie chart. I get the Text Outside XML error:

    <cfchart

           pieslicestyle="sliced"

          format="png"

          chartHeight = "400"

          chartWidth = "600"

          font="Arial"

          showborder="no"

          show3d="yes"

          yAxisTitle = "Test X Axis"

          style="test"

         >  

    Inspiring
    January 26, 2012

    test is the name of the xml file. (test.xml)

     

    I am not sure how CF would know it is an xml file without a path or extension. Like I mentioned, it is just going to assume the xml is literally the word "test".  At the very least you need to supply the *.xml extension.