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 won't work when passing my own array. #9347
Comments
How many points does your dataset have and what is the chart width? |
My mocked dataset has a 1000 points but the width of the chart is responsive. However, decimation doesn't seem to occur on any window size. EDIT: Alright, I tried reducing the window size of the window even more and I noticed decimation happening below 249px (it was configured as follows: lttb decimation with 50 smaples) |
You need points 4 times the width for it to decimate. |
#9327 will allow configuring that |
per dataset |
Alright, so having in mind that in my case I don't have enough points for decimation and #9327 will allow us to chose a specific treshold, I will close this issue. |
I've been having issues trying to get decimation to work and for a long time and I thought that my config was wrong. At some point I decided to take a look at the docs again and set all necessary options as described in the requirements, and also providing a prepared data with
parsing
set tofalse
. I still couldn't get decimation to work.I tried to make a very basic chart implementation in a simple HTML file in order to eliminate the possibility that something in my app is causing the trouble and I still get the same result. Today I tried the exact same example file but instead of using my test dataset, I copied the code from the official decimation example which dynamically generates the dataset from a single timestamp. Surprisingly for me - it worked. If I use the code from the example, decimation works, but as soon as I pass my own data array - it doesn't work.
For more information - I use a linear time scale with timestamps for the x axis. I use the date-fns adapter and for a long time I have been thinking that my problem was either in the date adapter or the zoom plugin. But as it turned out - both plugins are fine and don't break decimation at all.
So my question is - what is going on? My suspicion is in the last requirement for decimation -
The dataset object must be mutable
. If that's the case, can someone explain what I'm doing wrong? I thought that objects and arrays in JavaScript are mutable, even if they are defined as constants. I tried usinglet
andvar
but the result was still the same.The text was updated successfully, but these errors were encountered: