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

show/hide grid lines dynamically (on chart.load?) #63

Closed
philrenaud opened this issue Mar 8, 2014 · 7 comments
Closed

show/hide grid lines dynamically (on chart.load?) #63

philrenaud opened this issue Mar 8, 2014 · 7 comments
Labels
C-feature-request Category: A feature request or an enhancement

Comments

@philrenaud
Copy link

Hi! Is there any way to, on chart.load or any other event, set custom grid line values? I have several permutations/views on a single chart and their y-axis values are wildly different; I'd only like to show my custom gridlines on certain views.

Thanks!

@philrenaud
Copy link
Author

(similarly, could one change the range in a similar way? per http://c3js.org/samples/axes_y_range.html )

@masayuki0812
Copy link
Member

Hi, sorry currently not. But I think these APIs should be available, so I'll add them.
Please give me some time.

Thank you!

masayuki0812 added a commit that referenced this issue Mar 10, 2014
@masayuki0812
Copy link
Member

I added grid APIs. There are 6 APIs such as xgrid, xgrid.add, xgrid.remove , ygrid, ygrid.add, ygrid.remove.

Sample is also committed. Please see https://github.com/masayuki0812/c3/blob/master/htdocs/samples/grid_x_lines.html and https://github.com/masayuki0812/c3/blob/master/htdocs/samples/grid_y_lines.html .

Could you try these? And please let me know if you have any suggestion.

Thank you.

@philrenaud
Copy link
Author

@masayuki0812 perfect, works like a charm :) Thank you for your time!

@arush-nitkkr
Copy link

Can we anchor the text associated with optional grid lines to some other place rather than at the end.

@masayuki0812
Copy link
Member

@arush-nitkkr #813 seems to work for your case.

@ephilosophy
Copy link

Hii, I am having problem with show/hide ygrids dynamically. The grids don't load when the chart loads but when I press F12 the grids shows.. what could be the problem.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request or an enhancement
Projects
None yet
Development

No branches or pull requests

4 participants