From 6f199663cc99b8e00ae435622a5aef0fb2465624 Mon Sep 17 00:00:00 2001 From: vargburz Date: Tue, 5 Jul 2022 12:57:07 +0300 Subject: [PATCH] fix import conflit for grafana 9 --- src/grafana/data_processor.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/grafana/data_processor.ts b/src/grafana/data_processor.ts index 530bb6b..2be8ab0 100644 --- a/src/grafana/data_processor.ts +++ b/src/grafana/data_processor.ts @@ -2,16 +2,7 @@ import { applyNullInsertThreshold } from './null_insert'; import { find } from 'lodash'; -import { - DataFrame, - dateTime, - Field, - FieldType, - getColorForTheme, - getFieldDisplayName, - getTimeField, - TimeRange, -} from '@grafana/data'; +import { DataFrame, dateTime, Field, FieldType, getFieldDisplayName, getTimeField, TimeRange } from '@grafana/data'; import { colors } from '@grafana/ui'; import config from 'grafana/app/core/config'; import TimeSeries from 'grafana/app/core/time_series2'; @@ -91,7 +82,7 @@ export class DataProcessor { const series = new TimeSeries({ datapoints: datapoints || [], alias: alias, - color: getColorForTheme(color, config.theme), + color: config.theme.visualization.getColorByName(color), unit: field.config ? field.config.unit : undefined, dataFrameIndex, fieldIndex,