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

Use custom scale defaults and dataset axis ID options to determine the axis #11134

Merged
merged 8 commits into from
Feb 15, 2023

Conversation

stockiNail
Copy link
Contributor

@stockiNail stockiNail commented Feb 11, 2023

Fix #10945
This PR is solving the axis option determination if included in the custom scale defaults.
This is also addressing scales configurations (out of the box ones) where the axis is not recognizable by scale ID or axis/position options are missing. It uses datasets x/yAxisID options to determine the axis.

@stockiNail stockiNail marked this pull request as ready for review February 11, 2023 20:15
@stockiNail
Copy link
Contributor Author

stockiNail commented Feb 11, 2023

@etimberg @LeeLenaleee @dangreen @igorlukanin @kurkle I prepared the PR as written in the issue.
Apart using scale defaults to check axis/position, I have added code to check if an axis has been set to a dataset (by x/yAxisID options). If we find the axis id over there, we can assume that the axis is equal to x or y depending on configured options.

@stockiNail stockiNail changed the title Use custom scale defaults to determine the axis Use custom scale defaults and dataset axis ID options to determine the axis Feb 11, 2023
@stockiNail stockiNail requested a review from etimberg February 12, 2023 10:31
etimberg
etimberg previously approved these changes Feb 12, 2023
kurkle
kurkle previously approved these changes Feb 12, 2023
Copy link
Member

@kurkle kurkle left a comment

Choose a reason for hiding this comment

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

looks ok, bug could be cleaner with for..of

src/core/core.config.js Outdated Show resolved Hide resolved
@stockiNail stockiNail dismissed stale reviews from kurkle and etimberg via f0ac2b8 February 13, 2023 13:16
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.

custom scales: Cannot determine type of '${name}' axis.
3 participants