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

ticks.callback first argument contains index instead of value with Chart.js 3 #8825

Closed
ankane opened this issue Apr 4, 2021 · 4 comments
Closed

Comments

@ankane
Copy link
Contributor

ankane commented Apr 4, 2021

Expected Behavior

The first argument contains the value (like in Chart.js 2 and the docs)

Current Behavior

The first argument contains the index (as well as the 2nd)

Steps to Reproduce

https://codepen.io/ankane/pen/jOywNez

I tried to see if the value was moved to a different argument, but didn't see it any of the other args.

Context

Ran into this trying to upgrade Chartkick to Chart.js 3

Environment

  • Chart.js version: 3.0.2
  • Browser name and version: Firefox 87.0
@ankane
Copy link
Contributor Author

ankane commented Apr 4, 2021

My bad, just saw the note about getLabelForValue added in #8798.

@ankane ankane closed this as completed Apr 4, 2021
@mackuba
Copy link
Contributor

mackuba commented Dec 26, 2021

This should also be mentioned in the 2->3 migration guide, IMHO.

@chiendang1709
Copy link

@mackuba "ticks.callback first argument contains index instead of value with Chart.js 3", Do you fix ?

@chiendang1709
Copy link

@mackuba"ticks.callback đối số đầu tiên chứa chỉ mục thay vì giá trị với Chart.js 3", Bạn có khắc phục được không?

@ankane

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

No branches or pull requests

3 participants