Sign in to follow this  

Align annotations under gauge chart

Recommended Posts

Hi all


I need to take a fusion chart that was original made to be a fixed height and width and make it dynamic to its container. That is if the container expands the chart will re-render for the new size.


Iv'e managed to get the actual gauge chart to do this however the annotations under it im struggling with. They need to sit below the chart and center align to its width.


Iv'e attached what it looked like originally and how far ive managed to get. I still need to work on getting the needle to scale also.


As you can see the annotations are still in a fixed position. 


There is allot of tags in the XML to style it but the main thing i did to get the gauge to re-size was to remove the tags: gaugeOriginX, gaugeOriginY and gaugeOuterRadius.


Ive seen the chartBottomMargin tag which would allow me to specify a fixed margin at the bottom for the annotations to sit in but here lies my main question.


Is it possible to specify a percentage of the available space for the chart and annotations. Then have FusionCharts scale everything appropriately?


Otherwise You could end up with a really large chart and really small text under it. If not i'm still stuck on how to make the annotations sit under the chart and center on its width.


Any help would be greatly appritiated. 


Here's the XML for the annotations:

<annotations >
    <annotationGroup  xPos='180' yPos='100' showBelowChart='1'>
        <annotation  type='text' fontColor='777777' label='Taken:' xPos='0' yPos='0' align='center' fontFace='Verdana' isBold='1'/>
        <annotation  type='text' fontColor='777777' label='Remaining:' xPos='0' yPos='20' align='center' fontFace='Verdana' isBold='1'/>
    </annotationGroup >
</annotations >

I can post the entirety of the XML if needed but it is quite ugly with lots of tags.



Edited by ste2425

Share this post

Link to post
Share on other sites



Welcome to FusionCharts Forum!


FusionCharts Suite XT lets you control annotations dynamically using the FusionCharts API. These methods let you create, update, set the visibility of, and delete annotation groups and items at run-time.


For more details:


For resizing , the macros will help:


Try using the attribute origH, origW, refer this for the same:


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