Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
This commit is contained in:
co-authored by
Santiago
parent
b78aca6e23
commit
7c863f13e8
@@ -1,6 +1,6 @@
|
|||||||
import React, { useState, useLayoutEffect, useMemo, useRef } from 'react';
|
import React, { useState, useLayoutEffect, useMemo, useRef } from 'react';
|
||||||
import { FieldConfigSource, ThresholdsConfig, getValueFormat, FieldConfig } from '@grafana/data';
|
import { FieldConfigSource, ThresholdsConfig, getValueFormat } from '@grafana/data';
|
||||||
import { UPlotConfigBuilder, buildScaleKey, GraphFieldConfig } from '@grafana/ui';
|
import { UPlotConfigBuilder, buildScaleKey } from '@grafana/ui';
|
||||||
import { ThresholdDragHandle } from './ThresholdDragHandle';
|
import { ThresholdDragHandle } from './ThresholdDragHandle';
|
||||||
import uPlot from 'uplot';
|
import uPlot from 'uplot';
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ export const ThresholdControlsPlugin: React.FC<ThresholdControlsPluginProps> = (
|
|||||||
if (!thresholds) {
|
if (!thresholds) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const scale = buildScaleKey(fieldConfig as FieldConfig<GraphFieldConfig>);
|
const scale = buildScaleKey(fieldConfig.defaults);
|
||||||
|
|
||||||
const decimals = fieldConfig.defaults.decimals;
|
const decimals = fieldConfig.defaults.decimals;
|
||||||
const handles = [];
|
const handles = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user