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

Configuration #69

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Configuration #69

wants to merge 4 commits into from

Conversation

Fil
Copy link
Member

@Fil Fil commented Jun 23, 2020

Here's a proposal for #64

title

axis.title([title]) sets a title, which creates a text element towards the tip of the axis.

filter

axis.filter([filter]) allows to set a filter which will control the rendering of domain, tick line and text

  • Initially I wanted to make it depend on the datum, but it would mean to recheck each existing tick (line or text) to see if it still matches the filter, so maybe that's too much.

reach

axis.reach([reach]) allows to set a reach, which is like the innerSize, but in the opposite direction (into the chart), allowing to create a grid from the tick lines by calling e.g. axis.reach(width)

  • I'm not sure about the name
  • I'm not sure if this shouldn't be another layer of the axis (filter out by default if reach===0)

These options are demoed at https://observablehq.com/d/2e8bc58f05a8037a

Fil added 4 commits June 2, 2020 15:50
(rationale: don't let people install @2 in a build system that will not alert them that we have moved to ES6, only to cause trouble with a later release.)
- reach allows to create grid lines
- title adds a title near the tip of the axis
- filter() allows to render only the domain, tick lines or texts.

fixes #64
@Fil Fil added the feature label Jul 10, 2020
@Fil Fil changed the base branch from master to two July 27, 2020 14:26
Base automatically changed from two to master August 23, 2020 22:49
Copy link
Contributor

@curran curran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@curran
Copy link
Contributor

curran commented Jan 11, 2021

This would be quite useful.

@Fil
Copy link
Member Author

Fil commented May 16, 2022

TODO:

  • should filter be separated into filterTick and filterLabel? Often times you want the tick but not the label?
  • I suppose reach===0 should create the grid lines (vs reach==null), in order to make transitions possible?

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

Successfully merging this pull request may close these issues.

None yet

2 participants