Jump to content
JChartFX Community
  • 0
JohnDeery

Hiding a category on x axis

Question

JohnDeery    0

Hello,

I'm trying to set up some real-time filtering on my charts. In this case, I want to be able to hide a group of data (not a series) via checkbox. It's a bar chart with volume on the Y and months on the X, and if a user wants to hide certain months, I'd like to be able to target that x-axis "column" (not sure if that's the right terminology) and then hide it, but much like hiding a series, make it so I don't have to reload all the data to do so. Is this possible? Because I'm not seeing it in the documentation, but I might not know the correct terms.

Thanks!

Edit - I messed around with getData.setItem(), and doing so would allow me to remove the bars, but not the actual "column" from the chart, so if that helps explain better what I'm looking to do.

Edited by JohnDeery
more info

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
JuanC    3

We have no API that would allow you to remove a set of points/bars in the chart, you will have to keep the array that you supply the chart in the setDataSource call, and when the user wants to hide one or more points, remove them from the array and call setDataSource again.

Regards,

JuanC

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

×