-
Notifications
You must be signed in to change notification settings - Fork 576
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
Data Decimation not working #1383
Comments
@noobnoobdc137 - You mind putting this in a stackblitz or codesandbox for all of us? |
Not working for me either. Ideally, a simple way to have it would be;
And pass those option to the chart
My line chart has too many points crowding the line. It would be great to 'thin the herd' with this simple plugin. |
Probably decimation needs a re-render of the chart? Can you try using |
Did anybody get this to work? I am having the same problem. My data gets rendered but decimation is not applied. |
Any updates on this? I'm running into a similar issue |
I did get it to work, but it took some fiddling. I preprocessed my data to not need any interpolation by converting my x axis from an ISO Date to Milliseconds, that did the trick. I used luxon and the luxon chart.js adapter for the conversion and formatting. This is the code I applied to activate decimation: plugins: {
// ...
decimation: {
algorithm: 'lttb',
enabled: true,
samples: 100,
threshold: 40,
},
// ...
} For display purposes I formatted the date like this: scales: {
x: {
type: 'time',
time: {
displayFormats: {
month: 'MMM ‘yy',
},
},
},
// ...
} Hope it helps. |
Thank you.
and it didn't work unless explicitly stated |
Reproduction of the problem
TS file
Template HTML
Versions
Angular Version:
12.1.1
The text was updated successfully, but these errors were encountered: