|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 3/6/2008 8:55:37 PM
Posts: 3,
Visits: 9
|
|
Hi, I am new to FusionCharts. I am graphing a multi-series 2d line graph, in which the x-axis labels contain very small ecimals. I wish to keep the value on the decimals(i.e. no rounding), but to round their display on the x-axis. I wasn't able to find a switch suitable for this in the manual.
For e.g., i may pass the following xml for a multi-series 2d line chart,
categories
category label='0.04111111'
category label='0.04211111'
category label='0.04311111'
category label='0.04611111'
category label='0.05'
categories
dataset seriesName='s1'
set value='1'
set value='2'
set value='3'
set value='4'
set value='5'
dataset
dataset seriesName='s2'
set value='2'
set value='3'
set value='4'
set value='5'
set value='6'
dataset
i wish to see the x-axis labels rounded to 2 decimal points (not 3 or more due to space constraints), but retain their unrounded values as far as graphing is concerned.
That is, i would like to see the x-axis lablels: 0.04, 0.04, 0.04, 0.05, 0.05, but i still want to see the s1 and s2 data as though they are plotted against the true x-axis values passed, 0.04111111, 0.04211111 etc, like this,
                        4
                        3
            3
            2
2
1
0.04     0.04     0.04 ......
how can i achieve this?
would i be able to do the same for the Y-axis ?
thanks
|
|
|
|
|
FusionCharts Team
      
Group: Administrators
Last Login: 10/3/2008 2:42:18 AM
Posts: 2,117,
Visits: 498
|
|
Hi,
x-axis labels are treated as strings in FusionCharts, and as such you cannot round them.
Thanks, Pallav Nadhani FusionCharts Team
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 3/6/2008 8:55:37 PM
Posts: 3,
Visits: 9
|
|
thank you.
Still on 2d multi-series line graphs, how can i configure vertical div lines to show whenever there is a corresponding x-axis label displayed ?
for e.g. i may pass the following xml,
categories
category label='5'
category label='10'
category label='15'
category label='20'
category label='25'
categories
in this case since there are only 5 x-axis labels, i want to show all 5, and therefore want 3 div lines (2 lost to the left and right edges of the graph).
if the number of categories grows big, i may wish to display only every Nth label. I know i can use "labelStep" to do this. But then, how can i guarantee that 1 vertical div line will appear for every label displayed?
thanks again!
|
|
|
|
|
FusionCharts Team
      
Group: Administrators
Last Login: 10/3/2008 2:42:18 AM
Posts: 2,117,
Visits: 498
|
|
In that case you'll have to back-calculate in your XML generation script and provide the vlines and labelStep accordingly.
Thanks, Pallav Nadhani FusionCharts Team
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 3/6/2008 8:55:37 PM
Posts: 3,
Visits: 9
|
|
thanks for confirming.
Another question on the same type of graph, I'm currently using adjustDiv=0, since it seems to give me better Y-axis values than adjustDiv=1. I would further like to force the Y-axis labels to show 2dp, in the same fashion as decimals=2 and forceDecimals=1 does on the data plots.
So for e.g., currently i get the following Y-axis labels / values,
0 / 1.75 / 3.5 / 5.25 / 7
and i wish to see them as,
0.00 / 1.75 / 3.50 / 5.25 / 7.00
|
|
|
|