Time Series Panel: Add Null Filling and "No Value" Support (#50907)

* Use nullInsertThreshold and nullToValue in time series

* Allow for undefined timeRange to support certain candlestick uses of prepareGraphableFields

* Make sure null to value doesn't modify initial data

* Do a shallow values copy and avoid Array.push()

* Clean up null to value transformation.

* Add basic tests

* Remove redunant null threshold application flagging

* set nullThresholdApplied flag even when no null inserts were done

* Include nullThresholdApplied in test snapshot

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
Kyle Cunningham
2022-06-17 14:38:59 -05:00
committed by GitHub
parent 81089b956a
commit 86b785d039
8 changed files with 100 additions and 34 deletions

View File

@@ -36,7 +36,7 @@ export const TimeSeriesPanel: React.FC<TimeSeriesPanelProps> = ({
return getFieldLinksForExplore({ field, rowIndex, splitOpenFn: onSplitOpen, range: timeRange });
};
const frames = useMemo(() => prepareGraphableFields(data.series, config.theme2), [data]);
const frames = useMemo(() => prepareGraphableFields(data.series, config.theme2, timeRange), [data, timeRange]);
if (!frames) {
return (