Sign in to follow this  
razvan.deac

Multiple datasets on Dual axis charts

Recommended Posts

Hi,

 

I use multiple data-sets rendered on dual-axis charts. FusionCharts automatically renders on primary axis data-sets that do not have parentYAxis attribute specified. What is the best practice in this case? <parentYAxis> attribute should always be specified for dual-axis and multiple data-sets.

What if data-sets rendered on primary axis for example  have a different meaning like value and percent, how does the scale changes o this axis.

 

Thanks,

Razvan

Share this post


Link to post
Share on other sites

Hi Razvan,

 

Yes, the attribute "parentYAxis" needs to be used and set to "S", if you want your dataset to be mapped to secondary y-axis. Also, the default value of this attribute is "P" (primary y-axis). So, if not specified the dataset gets mapped to primary y-axis by default.

 

FusionCharts plots the chart based on the data you provide to it. It does not use any mechanism to auto-detect the values and plot the chart accordingly. Also,if you notice, you need to use the attribute "value" of set element even if your values are in value or percentage. For Eg. for one dataset you have values like 200,300 etc and for the other you have 2.5,4.5 etc then if you do not specify that the second one maps to secondary y-axis, you will find that the primary y-axis has accommodated values of both the datasets.

 

Hope I am able to clarify myself.

Share this post


Link to post
Share on other sites

Hi Haritha,

 

So if I use one data-set that that uses values like 10M, 20M... on the secondary axis and another one that uses values like 10k, 20k on the primary axis, when I set parentYAxis='P' for the data-set originally plotted on the secondary axis the primary axis scale will change to <VALUE>M?

 

Thanks,

Razvan

Share this post


Link to post
Share on other sites

Hi,

 

Yes, the values 10M,20M ... have to be plotted on primary y-axis when you set parentYAxis='P' and hence, to accommodate this change the values of primary y-axis are changed.

 

Hence, the use of attribute "parentYAxis" is vital for Dual y-axis charts.

 

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