airik

Annotation Do Not Appear On Spark Column Chart

Recommended Posts

I can not get any annotation to appear on a spark column chart.

 

I've copied examples of the cylinder chart and reproduced it on my local webpage but when I change the data series and chart type to spark column it won't render any annotations. The site says annotations work with all XT widgets.

 

Here is the XML I am using pretty much right off the fusion chart documentation:

 

 

<chart>

<dataset>

<set value='1000' />

<set value='1100'/>

<set value='1182'/>

<set value='1202'/>

<set value='1356'/>

<set value='1424'/>

<set value='1473'/>

<set value='1500'/>

<set value='1540'/>

<set value='1620'/>

<set value='1600'/>

<set value='1670'/>

</dataset>

<annotations>

<annotationGroup>

<annotation type='rectangle' x='120' y='60' toX='280' toY='120' radius='0' fillcolor='333333' fillAlpha='5'/>

<annotation type='line' x='120' y='60' toY='120' color='333333' thickness='2'/>

<annotation type='line' x='280' y='60' toY='120' color='333333' thickness='2'/>

<annotation type='line' x='120' y='60' toX='125' color='333333' thickness='2'/>

<annotation type='line' x='120' y='120' toX='125' color='333333' thickness='2'/>

<annotation type='line' x='275' y='60' toX='280' color='333333' thickness='2'/>

<annotation type='line' x='275' y='120' toX='280' color='333333' thickness='2'/>

<annotation type='text' label='Fuel left in tanker' font='Verdana' x='145' y='75' align='left' fontcolor='333333' fontSize='10' bold='1'/>

<annotation type='text' label='(expressed in ltrs)' font='Verdana' x='144' y='90' align='left' fontcolor='333333' fontSize='10'/>

<annotation type='text' label='3650' font='Verdana' x='145' y='105' align='left' fontcolor='333333' fontSize='10' bold='1'/>

</annotationGroup>

</annotations>

</chart>

 

Attached is the result screenshot (sample 2)

 

If I switch the chart t cylinder and change the value in the xml all is well (sample3)

post-28389-0-92272200-1340811183_thumb.png

post-28389-0-03007300-1340811268_thumb.png

Share this post


Link to post
Share on other sites

I found a way to make this work.

 

I set showBelow="0" (not sure what the default is when this is undefined)

I also found that to show an annotation to t he right of a chart you need to create space for it to appear. I did this by setting a very large right margin

 

chartLeftMargin='10' chartRightMargin='200' chartTopMargin='10' chartBottomMargin='10'

 

This created white space where I could place my annotation. My intuition was adding an annotation would cause the chart to grow but they seem to get clipped instead.

 

Anyways problem solved. : )

 

 

 

I can not get any annotation to appear on a spark column chart.

 

I've copied examples of the cylinder chart and reproduced it on my local webpage but when I change the data series and chart type to spark column it won't render any annotations. The site says annotations work with all XT widgets.

 

Here is the XML I am using pretty much right off the fusion chart documentation:

 

 

<chart>

<dataset>

<set value='1000' />

<set value='1100'/>

<set value='1182'/>

<set value='1202'/>

<set value='1356'/>

<set value='1424'/>

<set value='1473'/>

<set value='1500'/>

<set value='1540'/>

<set value='1620'/>

<set value='1600'/>

<set value='1670'/>

</dataset>

<annotations>

<annotationGroup>

<annotation type='rectangle' x='120' y='60' toX='280' toY='120' radius='0' fillcolor='333333' fillAlpha='5'/>

<annotation type='line' x='120' y='60' toY='120' color='333333' thickness='2'/>

<annotation type='line' x='280' y='60' toY='120' color='333333' thickness='2'/>

<annotation type='line' x='120' y='60' toX='125' color='333333' thickness='2'/>

<annotation type='line' x='120' y='120' toX='125' color='333333' thickness='2'/>

<annotation type='line' x='275' y='60' toX='280' color='333333' thickness='2'/>

<annotation type='line' x='275' y='120' toX='280' color='333333' thickness='2'/>

<annotation type='text' label='Fuel left in tanker' font='Verdana' x='145' y='75' align='left' fontcolor='333333' fontSize='10' bold='1'/>

<annotation type='text' label='(expressed in ltrs)' font='Verdana' x='144' y='90' align='left' fontcolor='333333' fontSize='10'/>

<annotation type='text' label='3650' font='Verdana' x='145' y='105' align='left' fontcolor='333333' fontSize='10' bold='1'/>

</annotationGroup>

</annotations>

</chart>

 

Attached is the result screenshot (sample 2)

 

If I switch the chart t cylinder and change the value in the xml all is well (sample3)

Edited by airik

Share this post


Link to post
Share on other sites
Guest Sumedh

I found a way to make this work.

 

I set showBelow="0" (not sure what the default is when this is undefined)

I also found that to show an annotation to t he right of a chart you need to create space for it to appear. I did this by setting a very large right margin

 

chartLeftMargin='10' chartRightMargin='200' chartTopMargin='10' chartBottomMargin='10'

 

This created white space where I could place my annotation. My intuition was adding an annotation would cause the chart to grow but they seem to get clipped instead.

 

Anyways problem solved. : )

 

 

 

 

 

Hi,

 

Its glad to know that you have managed to resolve your issue.

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