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

Building for production removes y axis ticks #11573

Open
mustzev opened this issue Nov 7, 2023 · 2 comments
Open

Building for production removes y axis ticks #11573

mustzev opened this issue Nov 7, 2023 · 2 comments

Comments

@mustzev
Copy link

mustzev commented Nov 7, 2023

Expected behavior

I have the following chart working as expected in the development build.
Screen Shot 2023-11-07 at 4 58 18 PM

Current behavior

When I build it in production, ticks on the y-axis disappear except maybe the max one. Also the label format changes.
Screen Shot 2023-11-07 at 4 56 20 PM

I have 2 null values at the end of my data.
I tried forcing ticks with the following option:
scales: { y: { ticks: { autoSkip: false, count: 10 } } }

├── chart.js@4.4.0
├── chartjs-plugin-datalabels@2.2.0
├── next@12.3.1
├── react-chartjs-2@5.2.0
├── react-dom@18.2.0
├── react@18.2.0

Sorry, could not create an interactive demo.

Reproducible sample

https://codesandbox.io/p/sandbox/react-chartjs-2-chart-js-issue-template-v4-forked-f6rlrj?file=%2Fsrc%2FApp.tsx%3A18%2C19

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

4.4.0

Browser name and version

Chrome 118.0.5

Link to your project

No response

@LuizPanariello
Copy link

Any news on this?
OP was able to fix?

@kazuyoshi-yamada-wmj
Copy link

kazuyoshi-yamada-wmj commented Apr 25, 2024

In my case, { scales: {y: {ticks: { precision: 1 } } } } works.

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