Sign in to follow this  
Saurabh Jain

Linked Fusion Charts Problem

Recommended Posts

Hi,

 

I facing a issue while render a linked combi2D chart. The problem is when a pass XML file to the FusionCharts.RenderChart("../Charts/MSCombi2D.swf", "Data.xml", "", "ID1", "600", "300", false, true); then its shows the chart but when i pass the same data as string the chart shows invalid data.

 

Please help.. Below is the XML file.

 

<chart bgColor='FFFFFF' maxLabelWidthPercent='15' showPlotBorder='0' yAxisMinValue='0' yAxisMaxValue='100' divLineDecimalPrecision='1' limitsDecimalPrecision='1' numberSuffix='%' useRoundEdges='1' showBorder='0' areaOverColumns='0' formatNumberScale='0'>

<categories>

<category label='NSW GOV' link='newchart-xml-ID0' />

<category label='SYD Corporate' link='newchart-xml-ID1' />

<category label='ABC' link='newchart-xml-ID2' />

<category label='SYD BTC' link='newchart-xml-ID3' />

</categories>

<dataset seriesName='Target' showValues='0' renderAs='Line' showShadow='1' color='#FF3300'>

<set value='80' link='newchart-xml-ID0' />

<set value='80' link='newchart-xml-ID1' />

<set value='80' link='newchart-xml-ID2' />

<set value='80' link='newchart-xml-ID3' />

</dataset>

<dataset seriesName='MTD Calls SL%' showValues='1' color='#009999'>

<set value='79.81' link='newchart-xml-ID0' />

<set value='89.58' link='newchart-xml-ID1' />

<set value='89.02' link='newchart-xml-ID2' />

<set value='86.13' link='newchart-xml-ID3' />

</dataset>

<dataset showValues='0' renderAs='Area' color='#FFC000' >

<set value='100' link='newchart-xml-ID0' />

<set value='100' link='newchart-xml-ID1' />

<set value='100' link='newchart-xml-ID2' />

<set value='100' link='newchart-xml-ID3' />

</dataset>

<dataset seriesName='UCL' showValues='0' renderAs='Area' color='#90EE90'>

<set value='85' link='newchart-xml-ID0' />

<set value='85' link='newchart-xml-ID1' />

<set value='85' link='newchart-xml-ID2' />

<set value='85' link='newchart-xml-ID3' />

</dataset>

<dataset seriesName='LCL' showValues='0' renderAs='Area' color='#FFA2A2'>

<set value='75' link='newchart-xml-ID0' />

<set value='75' link='newchart-xml-ID1' />

<set value='75' link='newchart-xml-ID2' />

<set value='75' link='newchart-xml-ID3' />

</dataset>

<styles>

<definition>

<style name='myValuesFont' type='font' size='11' bold='1'/>

</definition>

<application>

<apply toObject='DataValues' styles='myValuesFont' />

</application>

</styles>

<linkeddata id='ID0'>

<chart bgColor='FFFFFF' maxLabelWidthPercent='15' showPlotBorder='0' yAxisMinValue='0' yAxisMaxValue='100' divLineDecimalPrecision='1' limitsDecimalPrecision='1' numberSuffix='%' useRoundEdges='1' showBorder='0' areaOverColumns='0' formatNumberScale='0'>

<categories>

<category label='Jan' />

<category label='Feb' />

<category label='Mar' />

<category label='Apr' />

<category label='May' />

<category label='Jun' />

</categories>

<dataset seriesName='Calls SL%' showValues='1' color='#009999'>

<set value='80.32' />

<set value='70.16' />

<set value='56.42' />

<set value='57.92' />

<set value='66.74' />

<set value='79.81' />

</dataset>

<dataset seriesName='Target' showValues='0' renderAs='Line' showShadow='1' color='#FF3300'>

<set value='80' />

<set value='80' />

<set value='80' />

<set value='80' />

<set value='80' />

<set value='80' />

</dataset>

<dataset showValues='0' renderAs='Area' color='#FFC000' >

<set value='100' />

<set value='100' />

<set value='100' />

<set value='100' />

<set value='100' />

<set value='100' />

</dataset>

<dataset seriesName='UCL' showValues='0' renderAs='Area' color='#90EE90'>

<set value='85' />

<set value='85' />

<set value='85' />

<set value='85' />

<set value='85' />

<set value='85' />

</dataset>

<dataset seriesName='LCL' showValues='0' renderAs='Area' color='#FFA2A2'>

<set value='75' />

<set value='75' />

<set value='75' />

<set value='75' />

<set value='75' />

<set value='75' />

</dataset>

<styles>

<definition>

<style name='myValuesFont' type='font' size='11' bold='1'/>

</definition>

<application>

<apply toObject='DataValues' styles='myValuesFont' />

</application>

</styles>

</chart>

</linkeddata>

</chart>

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hey,

 

Please remove the new line character from you XML file and then pass it as a string to the chart.

 

Please find the attached HTML file for your reference.

 

Hope this helps!

demo.html

Share this post


Link to post
Share on other sites

Hey,

 

Please remove the new line character from you XML file and then pass it as a string to the chart.

 

Please find the attached HTML file for your reference.

 

Hope this helps!

 

 

Hi,

 

Thanks for your reply but i am rendering the chart like this.

 

string ab = "<chart bgColor='FFFFFF'...........";

Literal1.Text = FusionCharts.RenderChart("../Charts/MSCombi2D.swf", "", ab, "ID1", "600", "300", false, true);

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

We are able to render the chart successfully using the same method as you have posted.

 

Please find the attached screen shot of the same (using your XML string) for your reference.

 

Hope this helps !

post-23588-0-64578400-1341316202_thumb.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this