Skip to content

add a {line: true} option to axes - #406

Merged
Fil merged 3 commits into
mainfrom
fil/axis-support
Aug 12, 2021
Merged

Fil merged 3 commits into
mainfrom
fil/axis-support

Conversation

@Fil

@Fil Fil commented May 17, 2021

Copy link
Copy Markdown
Contributor

handy for materializing the vertical axis of a bar chart with an ordinal x
note that in the case of a continuous X, tickX([extent min]) is often preferable, since it creates the support line for all x/y facets

see https://observablehq.com/@fil/axis-support-406

suggested by @EE2dev

@Fil
Fil requested a review from mbostock May 17, 2021 13:43
@Fil Fil added the enhancement New feature or request label May 17, 2021
@enjalot

enjalot commented May 17, 2021

Copy link
Copy Markdown

this makes me want to have a { frame: true } option that adds a frame (to the bottom of the marks?). For most facet use cases a default frame is probably desired and good enough.
this wouldn't replace using the frame mark to create a customized frame, just make it easier to have one when exploring.

@mbostock

Copy link
Copy Markdown
Member

This seems like a good option to have, but I’m struggling with the name “support”—that doesn’t resonate with me. D3 calls this the “domain path”. Maybe axisLine would be okay? Should we allow you to style this line separately from the grid? It does seem related to the “frame” concept, too, so maybe frame would be okay as an option.

@Fil

Fil commented May 18, 2021

Copy link
Copy Markdown
Contributor Author

Is "support" a frenchism? Maybe a better translation for what I had in mind is “bearing” or “beam”.

Anyway, in this PR the axis line would be added (or "not removed" :)) on the materialized axes, not on all facets.

By contrast, Plot.ruleX([0]) and Plot.frame are present on all facets (more precisely "active" facets #332).

@mbostock mbostock added question Further information is needed and removed enhancement New feature or request labels Aug 11, 2021
@mbostock

Copy link
Copy Markdown
Member

Needs a better name than “support” but otherwise I’m onboard with the option.

@Fil

Fil commented Aug 12, 2021

Copy link
Copy Markdown
Contributor Author

axisLine is fine, I think?

Fil added 2 commits August 12, 2021 10:15
handy for materializing the vertical axis of a bar chart with an ordinal x
note that in the case of a continuous *X*, tickX([*extent min*]) is often preferable, since it creates the support line for all x/y facets
@Fil
Fil force-pushed the fil/axis-support branch from 12691c0 to 88ed920 Compare August 12, 2021 08:23
@Fil Fil changed the title add a {support: true} option to axes add a {axisLine: true} option to axes Aug 12, 2021
@mbostock

Copy link
Copy Markdown
Member

What about simply the name “line”? That seems to match the name “grid” pretty well, and I can’t think of any obvious ambiguity with the shorter name.

@Fil Fil changed the title add a {axisLine: true} option to axes add a {line: true} option to axes Aug 12, 2021
@Fil
Fil merged commit fe06c22 into main Aug 12, 2021
@Fil
Fil deleted the fil/axis-support branch August 12, 2021 20:24
@Fil

Fil commented Aug 20, 2021

Copy link
Copy Markdown
Contributor Author

axis-line

(example for the CHANGELOG)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Further information is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants