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

fix: show gridline of first axis only for dual axes charts #8962

Merged
merged 3 commits into from
Jun 26, 2023

Conversation

kanitw
Copy link
Member

@kanitw kanitw commented Jun 25, 2023

Rationale: Better transitions -- at least adding the second axis won't suddenly hide all gridlines

@kanitw kanitw requested review from domoritz and fandu-db June 25, 2023 23:55
if (resolve.axis[channel] === 'independent' && axes[channel] && axes[channel].length > 1) {
let first = true;
for (const axisCmpt of axes[channel]) {
Copy link
Member

Choose a reason for hiding this comment

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

With .entries(), you get the index and can use that instead of the somewhat ugly first variable.

@domoritz
Copy link
Member

Good change overall (as discussed on our hike).

@kanitw kanitw merged commit a522a87 into main Jun 26, 2023
@kanitw kanitw deleted the kw/dual-axis-grid branch June 26, 2023 17:42
BradyJ27 pushed a commit to BradyJ27/vega-lite that referenced this pull request Oct 19, 2023
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.

2 participants