Trygve

Dynamic Yaxis Scaling

Recommended Posts

Hi,

 

I have several multiline charts where one of the data-set is much much bigger than the others making them unreadable.

In 3.2 I can hide a data-set, but to be able to read the smaller data-sets I need the chart to automatic rescale the yaxis when a data-set is enabled or disabled.

Is this possible? If not, are there any alternatives? (like enabling/disabling datasets from outside the chart and using javascript to redraw the chart)

 

Thanks!

Trygve

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi Trygve ,

 

Welcome to FusionCharts Forum. :(

 

I am afraid, FusionCharts does not support the same as of now.

 

However, you can always use the interactive legends of the multi-series charts(v 3.2) to enable or disable the dataplots for better readibility.

 

I hope this helps.

Share this post


Link to post
Share on other sites

Hi Basundhara, and thanks :)

 

I have already implemented interactive legends to disable data-sets, that is where the problem lies. When I disable the large dataset the small ones are still just as unreadable since they are all compressed together at the bottom. Two images attached to illustrate this.

 

With large dataset:

chart1z.gif

 

After hiding large dataset:

chart2.gif

 

So, hiding the large data-set does absolutely nothing with the readability :)

 

But is it possible to change the xml-url and regenerate the chart through javascript? If so, I could keep the disable/enable dataset buttons outside the chart and add code that will first regenerate the XML with/without the dataset and then make the chart regenerate itself.

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

 

Thanks for your reply. :)

 

But is it possible to change the xml-url and regenerate the chart through javascript?

 

Please refer to the FusionCharts and JavaScript section of the online documentation of FusionCharts.

 

Ref.- http://www.fusioncharts.com/docs --> FusionCharts and JavaScript

 

could keep the disable/enable dataset buttons outside the chart and add code that will first regenerate the XML with/without the dataset and then make the chart regenerate itself.

 

I am afraid, as of now, FusionCharts does not support the same.

 

I hope this helps.

Share this post


Link to post
Share on other sites

 

I am afraid, as of now, FusionCharts does not support the same.

 

I hope this helps.

 

First!

 

Sure it's possible :)

I managed to do this by creating the chart as a javascript object and creating a legend outside the chart. When clicking the legend, a PHP-script in an iframe updates the XML and changes the XML-url of the chart. Its not pretty as the whole chart re-renders instead of just changing the contents, but it works.

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