Problem
The _syncSeriesWithSelection function in src/AnalyzeView/LogViewer/LogViewerChart.qml uses uniform stride decimation to reduce data to _maxChartPointsPerField (6000) points:
const sampleStep = Math.max(1, Math.ceil(points.length / _maxChartPointsPerField))
Uniform stride sampling can miss peaks and troughs between sampled points, causing the rendered chart to look flat or smoothed when the actual data has sharp spikes or valleys.
Solution
Implement the Largest Triangle Three Buckets (LTTB) algorithm for downsampling. LTTB selects points that best preserve the visual shape of the data within the same point budget. It is specifically designed for time-series chart decimation and produces far more visually accurate results than uniform stride at the same number of output points.
Reference: Steinarsson (2013) — Downsampling Time Series for Visual Representation
JavaScript implementation reference: https://github.com/sveinn-steinarsson/flot-downsample
Files
src/AnalyzeView/LogViewer/LogViewerChart.qml — replace stride loop in _syncSeriesWithSelection with LTTB
Problem
The
_syncSeriesWithSelectionfunction insrc/AnalyzeView/LogViewer/LogViewerChart.qmluses uniform stride decimation to reduce data to_maxChartPointsPerField(6000) points:Uniform stride sampling can miss peaks and troughs between sampled points, causing the rendered chart to look flat or smoothed when the actual data has sharp spikes or valleys.
Solution
Implement the Largest Triangle Three Buckets (LTTB) algorithm for downsampling. LTTB selects points that best preserve the visual shape of the data within the same point budget. It is specifically designed for time-series chart decimation and produces far more visually accurate results than uniform stride at the same number of output points.
Reference: Steinarsson (2013) — Downsampling Time Series for Visual Representation
JavaScript implementation reference: https://github.com/sveinn-steinarsson/flot-downsample
Files
src/AnalyzeView/LogViewer/LogViewerChart.qml— replace stride loop in_syncSeriesWithSelectionwith LTTB