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

Can not remove grid line #720

Closed
J-F-Liu opened this issue Nov 16, 2014 · 3 comments
Closed

Can not remove grid line #720

J-F-Liu opened this issue Nov 16, 2014 · 3 comments
Labels
C-bug Category: This is a bug resolved maybe

Comments

@J-F-Liu
Copy link
Contributor

J-F-Liu commented Nov 16, 2014

chart.ygrids.add([{ value: 1, text: 'Pressure Low' }, { value: 4, text: 'Pressure High' }]); // success
chart.ygrids.remove([{ value: 1, text: 'Pressure Low' }, { value: 4, text: 'Pressure High' }]); //fail
I think in c3_chart_internal_fn.getGridFilterToRemove method of c3.js:
if ((('value' in param && line.value === params.value) || ('class' in param && line['class'] === params['class']))) 
Should be:
if ((('value' in param && line.value === param.value) || ('class' in param && line['class'] === param['class']))) 
@J-F-Liu
Copy link
Contributor Author

J-F-Liu commented Nov 16, 2014

verified after modification.

@masayuki0812
Copy link
Member

Thank you for your reporting. You're right. I think this has been fixed by this commit and I'll release this in the next version. Thanks!

@masayuki0812 masayuki0812 added C-bug Category: This is a bug resolved maybe labels Nov 16, 2014
@masayuki0812
Copy link
Member

I released v0.4.2 for this fix, so please let me close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug resolved maybe
Projects
None yet
Development

No branches or pull requests

2 participants