Sign in to follow this  
xiexiest

Can The Set Value Be String?

Recommended Posts

 
 
<div id ="chart1" style="color:red"></div>
 
<script type="text/javascript">
window.onload = function(){
var chart1 = new FusionCharts('fusioncharts/SSGrid.swf', "chart1", document.body.clientWidth*0.2, "300", "0", "1");
chart1.setTransparent(true);
chart1.setDataURL("SSGrid.xml");
chart1.render("chart1");
}
 
</script>
 
SSGrid.xml:
 
<chart caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showValues='0' decimals='0' formatNumberScale='0' labelDisplay='Rotate'>
    <set label='Jan' value='462' />
    <set label='Feb' value='857' />
    <set label='Mar' value='671' />
    <set label='Apr' value='494' />
    <set label='May' value='761' />
    <set label='Jun' value='960' />
</chart>
 
It works when the value is number ,but when i change it to string ,it does't work.
 
<chart caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showValues='0' decimals='0' formatNumberScale='0' labelDisplay='Rotate'>
    <set label='Jan' value='apple' />
    <set label='Feb' value='banana' />
    <set label='Mar' value='cherry' />
    <set label='Apr' value='cumquat' />
    <set label='May' value='haw' />
    <set label='Jun' value='fig' />
</chart>

 

 

What can I do? waiting for your answer.

Edited by xiexiest

Share this post


Link to post
Share on other sites

Hey,

 

The "value" attribute accepts only numerical value for the data item. It does not accepts a String values.

 

Hope this helps.

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