-
Notifications
You must be signed in to change notification settings - Fork 178
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
custom grid ticks #612
custom grid ticks #612
Conversation
I might go back to one mark per grid tick, which would also help support grid lines with various styles (as in #114 (comment)) [edit: done] |
Not sure how to design it so that the styles (opacity: 0.1) could be modified through the plot's root style option. It's a generic question though (see #397 #253). For now the demo adds a custom <style> element: https://observablehq.com/@observablehq/plot-custom-grid-612 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you specify explicit values for the scale’s grid, we should extend the default domain to cover those values. I’d also prefer to stick to the existing attributes, rather than extending the inline stylesheets, for consistency with d3-axis. I’m cool with adding a “grid” class to differentiate these grid lines from ticks, though.
…rray of tick values Other changes: * The grids are not mixed with the axis ticks any more. Instead, they are created in a g element below the axis, with a .grid className. * The faceted grids are not generated as interrupted paths, but as groups of lines (making it easier to work with them downstream). * The code is a few lines longer but (imho) easier to read. closes #7
…sharray) and transitions (which is why we pass the unscaled ticks).
0dd0dd4
to
07d46b2
Compare
Fixes #7.
Demo: https://observablehq.com/@observablehq/plot-custom-grid-612