Francesco

Hide a category in a stackedcolumn2d chart

Recommended Posts

Hi all,

in a stackedcolumn2d we need to hide series and categories.
First is handled by legend clicks and for the latter we defined a custom JavaScript function in link label attribute. Here we look for  Fusioncharts widget and call getChartData() in order to manipulate the dataset before calling setChartData again.
However, apart from 'initiallyHidden' attribute only works for series and we could not find a similar attribute for driving categories visibility.
If you look at attached image, hiding first column in the chart will make it re-scale, giving a decent size to other very small columns.

Regards,

Francesco

 

stacked.jpg

Edited by Francesco

Share this post


Link to post
Share on other sites

...the only way we found to achieve this behaviour is to actually remove data from chart dataset before calling setChartData() in click callback function.
Is this the only one solution?

Regards,
Francesco

Share this post


Link to post
Share on other sites

Hi Francesco,

 

To hide the dataset initially you can set the attribute "visible" to "0" at dataset objects. Refer to the sample : http://jsfiddle.net/cqvpe27z/

 

To hide the x-axis category labels, you need to set "showLabels" to "0" at chart-level dataSource. Or you can also set "showLabel" attribute individually at each category objects. Refer to this sample fiddle : http://jsfiddle.net/cqvpe27z/1/

 

For further reference check the documentation link : https://www.fusioncharts.com/dev/chart-guide/chart-configurations/data-labels

 

If you still have any question, feel free to ask along with a sample for reference.

 

Thanks,

Akash.

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