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

Decimation docs missing requirement #10514

Closed
1 of 3 tasks
MaxboDev opened this issue Jul 24, 2022 · 2 comments · Fixed by #10516
Closed
1 of 3 tasks

Decimation docs missing requirement #10514

MaxboDev opened this issue Jul 24, 2022 · 2 comments · Fixed by #10516

Comments

@MaxboDev
Copy link
Contributor

MaxboDev commented Jul 24, 2022

Documentation Is:

  • Missing or needed?
  • Confusing
  • Not sure?

Please Explain in Detail...

After experimentation I found that decimation only works if the number of points on the chart is 4+ times the pixel width of the chart. You can see it here: https://codesandbox.io/s/react-17-forked-gt7qvw?file=/src/App.js. Resize the preview area and you'll see decimation kick in at widths below 500px.

This requirement isn't documented in list here: https://www.chartjs.org/docs/latest/configuration/decimation.html#requirements

I'm also not sure why this is a requirement. It makes sense for min-max decimation but when using lttb it doesn't seem necessary.

Your Proposal for Changes

It seems like this requirement should be documented here. Will create a PR for it.

Example

https://codesandbox.io/s/react-17-forked-gt7qvw?file=/src/App.js

@etimberg
Copy link
Member

Writing some documentation is good. The 4*width is just the default. If you set the threshold option of the plugin, it will use that instead.

@etimberg etimberg added this to the Version 3.9.0 milestone Jul 24, 2022
@MaxboDev
Copy link
Contributor Author

Ah thanks, I missed that. Have created a PR to mention that in the decimation requirements here #10516

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

Successfully merging a pull request may close this issue.

3 participants