Skip to content

Conversation

@henryjameslau
Copy link
Contributor

First attempt at customTimeAxis for economist style ticks

@broadpeter
Copy link
Contributor

Ultimately we want to allow users to switch between Economist-style and specific points (using getXAxisTicks)

@henryjameslau
Copy link
Contributor Author

henryjameslau commented Nov 13, 2025

Ultimately we want to allow users to switch between Economist-style and specific points (using getXAxisTicks)

You mean in the config? @broadpeter
I was doing it as an alternative to d3.axisBottom(x) so customTimeAxis(x) rather than using getXAxisTicks

@henryjameslau
Copy link
Contributor Author

henryjameslau commented Nov 14, 2025

OK added the option into the config, although I did an alternative where I just use getXAxisTicks to get an array to pass into .tickValues and set the tickFormat to make the labels blank and then add labels between the ticks afterwards.

Copy link
Contributor

@nrennie nrennie left a comment

Choose a reason for hiding this comment

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

I have no strong opinions on economist style axes, but whatever is decided - can you also add it to the two line-chart-sm, line chart dropdown, and two line chart with ci-area when it's ready?

Should getXAxisTicks() in the line-chart template be moved into the helpers.js file?

See also #361

@henryjameslau henryjameslau marked this pull request as draft November 21, 2025 15:06
@henryjameslau henryjameslau marked this pull request as ready for review January 2, 2026 10:37
@henryjameslau
Copy link
Contributor Author

Ready for review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants