Hybrid area and line chart for irregularly spaces dataset

31 views
Skip to first unread message

tri...@triggerindustries.co.uk

unread,
Nov 28, 2020, 2:05:49 PM11/28/20
to d3-js
Hi all,

I have a very large dataset which I am using an area chart to represent (1million+ points). I need to plot this time series to indicate any outliers to the end-users. I use the max and min of a binned fixed-length sliding window and then create an area chart between the max's and min's. This looks very similar to the original series for regularly spaced intervals, however, when the intervals are irregularly spaced the plot does not represent the original series.

For example, I have a week of data sampled at 0.5 second intervals, and then I have a one day delay, and then perhaps I have 2 or 3 samples, and then another delay before the high frequency sampling begins again. Ultimately what I would like to do is set a tolerance and then if the distance between two consecutive points exceeds the tolerance, then instead of using an area chart between the max's and min's, I use a line chart between successive points.

Can anyone provide any pointers on how I could achieve this? I tried to keep using an area chart and then just interpolate from the high density sample portion to the sparse samples but the distance between the max's and min's becomes zero and therefore no chart is showed.

Thanks,
TJ
Reply all
Reply to author
Forward
0 new messages