Sign in to follow this  
Jvanleuvan

Cant Use Setchartattribute

Recommended Posts

I am trying to use setChartAttribute to change the font size of the chart based on the user's window size. But I can't get it to work (even in testing)

 

The problem is that the font size appears to stay the same 10pt font, even if I set it to a huge 50pt or a tiny 3 pt

 

Also I have another question: Do I have to call the render() method after I chage a setting with setChartAttribute()?

 

Here is the code i've tried, neither worked

 

TRY #1-----------------------------

 

function load(){

myVChart = new FusionCharts('Charts/bar2d.swf', 'myChartId', '98%', '95%', '0', '1');

myVChart.setXMLUrl('xml/test.xml');

myVChart.setChartAttribute('outCnvBaseFontSize',40);

myVChart.render('graphH');

};

 

TRY #2-----------------------------

 

 

 

function load(){

myVChart = new FusionCharts('Charts/bar2d.swf', 'myChartId', '98%', '95%', '0', '1');

myVChart.setXMLUrl('xml/test.xml');

myVChart.render('graphH');

myVChart.setChartAttribute('outCnvBaseFontSize',40);

};

 

post-17938-0-31489800-1314978130_thumb.png

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thanks for your post.

 

You would need to use STYLES in order to change the font size of the caption.

 

FusionCharts v3 introduces Styles to help you apply font, effects and animations to various objects of the chart. Styles lends a simple mechanism using which you can easily control the visual layout of charts.

 

For more details, please visit the links below:

 

http://www.fusioncha...les/Styles.html

 

http://www.fusioncha...s/HowToUse.html

 

http://www.fusioncha...tyles/Font.html

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