Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toggled between visible and invisible #30

Open
timqian opened this issue Sep 9, 2019 · 5 comments
Open

toggled between visible and invisible #30

timqian opened this issue Sep 9, 2019 · 5 comments

Comments

@timqian
Copy link
Owner

timqian commented Sep 9, 2019

allows user to toggle visible and invisible of different labels

Example

Usage example

star-history/star-history#62

@bikingbadger
Copy link
Contributor

If no one is assigned or working I wouldn't mind giving it a go

@timqian
Copy link
Owner Author

timqian commented Sep 11, 2019

@bikingbadger Glad to hear that. I think no one is working on this~

@bikingbadger
Copy link
Contributor

Thanks @timqian
It's actually something that I was looking when using the chart.

@bikingbadger
Copy link
Contributor

I've managed to catch the click on the actual rectangle of the legend.
What do you think is the best way to change the dataset of the graph or fire a function on the Line class to change the underlying data.

I had an idea of adding a parameter to the dataset like this:

datasets: [{
      label: 'Plan',
      data: [30, 70, 200, 300, 500, 800, 1500, 2900, 5000, 8000],
      hidden: false,
    }

That way the a function of the class can just toggle the hidden value and a user can setup the table with datasets hidden but shown in the legend.
I've pretty new to SVG's and getting around Classes so hope I'm not asking silly questions although I think the method of hwo to show or hide the series could be used commonly between the various charts by way of extending a parent Chart class

@timqian
Copy link
Owner Author

timqian commented Sep 12, 2019

@bikingbadger
“a user can setup the table with datasets hidden but shown in the legend”, this sounds interesting to me, but I am not sure if this feature is necessary, I don't see this option in other maturer chart libs likechart.js or echarts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants