Sign in to follow this  
amolchaudhari69@gmail.com

How to Hide/Show bar in MSCombiDY2D chart

Recommended Posts

Hello Team,

 

 I am using MSCombiDY2D javascript driven chart, which current showing current year's and Last year's data.

 

There is a checkbox on a screen for include last year data, so when user will uncheck is I want to Hide Last Years Data Bar from the graph

 

and when User selects a checkbox then I want to show The last Years Data bar on the graph again.

 

Could you please help me out how can I hide or Show Bar from the chart.

 

Attaching Sample Json

 

Thanks In Advance !!!

 

Amol.

MSCombiDY2D .json.txt

Share this post


Link to post
Share on other sites

Hi,

 

As per your requirement, to hide the last year data via check box cannot be fulfilled since the attribute of each dataset of the MSCombiDY2D cannot be accessed separately.

 

But to hide the data set initially, you can try setting the attribute  "initiallyHidden": "1" in the data set element of the respective series.

 

Also, the click of legend will help you to hide the data set you want to hide.

 

A sample JSFiddle link :http://jsfiddle.net/vishalika/wwjrq0jc/

 

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