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

Bar chart with indexAxis: 'y' requires data.labels whereas 'x' doesn't. #11688

Closed
wants to merge 2 commits into from

Conversation

ItsRkaj
Copy link

@ItsRkaj ItsRkaj commented Feb 28, 2024

As reported in #11684, indexAxis y requires data.labels whereas indexAxis x does not. According to the same issue y should be treated as x in this case. Where this PR solves that problem.

This is done by checking if data.labels.lenght is 0 and indexAxis set to y then we transform the data.dataset.data to set the required data.labels and data.dataset.data in order to work as expected.

Closes #11684

@LeeLenaleee
Copy link
Collaborator

Hi I appreciate the PR with a fix for the problem. I have made a alternative PR to fix the issue since I don't think putting the data in the labels array is the correct fix.

The underlying issue is in my eyes that the data array was always build staticly instead of dynamically.

@LeeLenaleee
Copy link
Collaborator

Fixed in #11690

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

Successfully merging this pull request may close these issues.

Bar chart with indexAxis: 'y' requires data.labels (whereas 'x' does not)
2 participants