diff --git a/package.json b/package.json index 4d9b322fbc7..ce497d834f8 100644 --- a/package.json +++ b/package.json @@ -354,7 +354,7 @@ "tether": "1.4.7", "tether-drop": "https://github.com/torkelo/drop", "tinycolor2": "1.4.1", - "uplot": "1.6.16", + "uplot": "1.6.17", "uuid": "8.3.0", "vendor": "link:./public/vendor", "visjs-network": "4.25.0", diff --git a/packages/grafana-ui/package.json b/packages/grafana-ui/package.json index 0ceeafd9d3e..11e8ad900d6 100644 --- a/packages/grafana-ui/package.json +++ b/packages/grafana-ui/package.json @@ -87,7 +87,7 @@ "slate-plain-serializer": "0.7.10", "tinycolor2": "1.4.1", "tslib": "2.3.1", - "uplot": "1.6.16", + "uplot": "1.6.17", "uuid": "8.3.0" }, "devDependencies": { diff --git a/packages/grafana-ui/src/components/GraphNG/GraphNG.tsx b/packages/grafana-ui/src/components/GraphNG/GraphNG.tsx index 39e8c56be39..a168ada1457 100755 --- a/packages/grafana-ui/src/components/GraphNG/GraphNG.tsx +++ b/packages/grafana-ui/src/components/GraphNG/GraphNG.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { AlignedData } from 'uplot'; +import uPlot, { AlignedData } from 'uplot'; import { Themeable2 } from '../../types'; import { findMidPointYPosition, pluginLog } from '../uPlot/utils'; import { diff --git a/packages/grafana-ui/src/components/uPlot/config/UPlotThresholds.ts b/packages/grafana-ui/src/components/uPlot/config/UPlotThresholds.ts index 7c34e883de3..e7bd4c24440 100644 --- a/packages/grafana-ui/src/components/uPlot/config/UPlotThresholds.ts +++ b/packages/grafana-ui/src/components/uPlot/config/UPlotThresholds.ts @@ -2,6 +2,7 @@ import { GrafanaTheme2, ThresholdsConfig, ThresholdsMode } from '@grafana/data'; import { GraphThresholdsStyleConfig, GraphTresholdsStyleMode } from '@grafana/schema'; import { getGradientRange, GradientDirection, scaleGradient } from './gradientFills'; import tinycolor from 'tinycolor2'; +import uPlot from 'uplot'; export interface UPlotThresholdOptions { scaleKey: string; diff --git a/packages/grafana-ui/src/components/uPlot/geometries/EventsCanvas.tsx b/packages/grafana-ui/src/components/uPlot/geometries/EventsCanvas.tsx index 99089dc5bfa..85d248fe84c 100644 --- a/packages/grafana-ui/src/components/uPlot/geometries/EventsCanvas.tsx +++ b/packages/grafana-ui/src/components/uPlot/geometries/EventsCanvas.tsx @@ -4,6 +4,7 @@ import { useMountedState } from 'react-use'; import { UPlotConfigBuilder } from '../config/UPlotConfigBuilder'; import { Marker } from './Marker'; import { XYCanvas } from './XYCanvas'; +import uPlot from 'uplot'; interface EventsCanvasProps { id: string; diff --git a/packages/grafana-ui/src/components/uPlot/utils.ts b/packages/grafana-ui/src/components/uPlot/utils.ts index 67035224ced..426d14b024a 100755 --- a/packages/grafana-ui/src/components/uPlot/utils.ts +++ b/packages/grafana-ui/src/components/uPlot/utils.ts @@ -1,7 +1,7 @@ import { DataFrame, ensureTimeField, Field, FieldType } from '@grafana/data'; import { StackingMode, VizLegendOptions } from '@grafana/schema'; import { orderBy } from 'lodash'; -import { AlignedData, Options, PaddingSide } from 'uplot'; +import uPlot, { AlignedData, Options, PaddingSide } from 'uplot'; import { attachDebugger } from '../../utils'; import { createLogger } from '../../utils/logger'; diff --git a/public/app/plugins/panel/market-trend/MarketTrendPanel.tsx b/public/app/plugins/panel/market-trend/MarketTrendPanel.tsx index cd32f42aa00..69e5ff1666d 100644 --- a/public/app/plugins/panel/market-trend/MarketTrendPanel.tsx +++ b/public/app/plugins/panel/market-trend/MarketTrendPanel.tsx @@ -17,6 +17,7 @@ import { defaultColors, MarketOptions, MarketTrendMode } from './models.gen'; import { ScaleProps } from '@grafana/ui/src/components/uPlot/config/UPlotScaleBuilder'; import { AxisProps } from '@grafana/ui/src/components/uPlot/config/UPlotAxisBuilder'; import { prepareCandlestickFields } from './fields'; +import uPlot from 'uplot'; interface MarketPanelProps extends PanelProps {} diff --git a/public/app/plugins/panel/state-timeline/utils.ts b/public/app/plugins/panel/state-timeline/utils.ts index a4417fc15b8..fdd99a988e8 100644 --- a/public/app/plugins/panel/state-timeline/utils.ts +++ b/public/app/plugins/panel/state-timeline/utils.ts @@ -34,6 +34,7 @@ import { VizLegendOptions, AxisPlacement, ScaleDirection, ScaleOrientation } fro import { TimelineFieldConfig, TimelineOptions } from './types'; import { PlotTooltipInterpolator } from '@grafana/ui/src/components/uPlot/types'; import { preparePlotData } from '../../../../../packages/grafana-ui/src/components/uPlot/utils'; +import uPlot from 'uplot'; const defaultConfig: TimelineFieldConfig = { lineWidth: 0, diff --git a/public/app/plugins/panel/timeseries/plugins/AnnotationEditorPlugin.tsx b/public/app/plugins/panel/timeseries/plugins/AnnotationEditorPlugin.tsx index e082454e80a..43d0e6e8bc0 100644 --- a/public/app/plugins/panel/timeseries/plugins/AnnotationEditorPlugin.tsx +++ b/public/app/plugins/panel/timeseries/plugins/AnnotationEditorPlugin.tsx @@ -3,6 +3,7 @@ import { PlotSelection, UPlotConfigBuilder } from '@grafana/ui'; import React, { useCallback, useLayoutEffect, useRef, useState } from 'react'; import { useMountedState } from 'react-use'; import { AnnotationEditor } from './annotations/AnnotationEditor'; +import uPlot from 'uplot'; type StartAnnotatingFn = (props: { // pixel coordinates of the clicked point on the uPlot canvas diff --git a/public/app/plugins/panel/timeseries/plugins/AnnotationsPlugin.tsx b/public/app/plugins/panel/timeseries/plugins/AnnotationsPlugin.tsx index d9a24dd3234..ad6a58b8ac8 100644 --- a/public/app/plugins/panel/timeseries/plugins/AnnotationsPlugin.tsx +++ b/public/app/plugins/panel/timeseries/plugins/AnnotationsPlugin.tsx @@ -2,6 +2,7 @@ import { colorManipulator, DataFrame, DataFrameFieldIndex, DataFrameView, TimeZo import { EventsCanvas, UPlotConfigBuilder, useTheme2 } from '@grafana/ui'; import React, { useCallback, useEffect, useLayoutEffect, useRef } from 'react'; import { AnnotationMarker } from './annotations/AnnotationMarker'; +import uPlot from 'uplot'; interface AnnotationsPluginProps { config: UPlotConfigBuilder; diff --git a/public/app/plugins/panel/timeseries/plugins/ExemplarsPlugin.tsx b/public/app/plugins/panel/timeseries/plugins/ExemplarsPlugin.tsx index 31ef89bef67..ea22594b674 100644 --- a/public/app/plugins/panel/timeseries/plugins/ExemplarsPlugin.tsx +++ b/public/app/plugins/panel/timeseries/plugins/ExemplarsPlugin.tsx @@ -10,6 +10,7 @@ import { import { EventsCanvas, FIXED_UNIT, UPlotConfigBuilder } from '@grafana/ui'; import React, { useCallback, useLayoutEffect, useRef } from 'react'; import { ExemplarMarker } from './ExemplarMarker'; +import uPlot from 'uplot'; interface ExemplarsPluginProps { config: UPlotConfigBuilder; diff --git a/public/app/plugins/panel/timeseries/plugins/ThresholdControlsPlugin.tsx b/public/app/plugins/panel/timeseries/plugins/ThresholdControlsPlugin.tsx index 51ab192d152..fcd40e822a9 100644 --- a/public/app/plugins/panel/timeseries/plugins/ThresholdControlsPlugin.tsx +++ b/public/app/plugins/panel/timeseries/plugins/ThresholdControlsPlugin.tsx @@ -2,6 +2,7 @@ import React, { useState, useLayoutEffect, useMemo, useRef } from 'react'; import { FieldConfigSource, ThresholdsConfig, getValueFormat } from '@grafana/data'; import { UPlotConfigBuilder, FIXED_UNIT } from '@grafana/ui'; import { ThresholdDragHandle } from './ThresholdDragHandle'; +import uPlot from 'uplot'; const GUTTER_SIZE = 60; diff --git a/yarn.lock b/yarn.lock index a9a1e1cd01e..d99ee79cf75 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2845,7 +2845,7 @@ __metadata: ts-loader: 8.0.11 tslib: 2.3.1 typescript: 4.4.3 - uplot: 1.6.16 + uplot: 1.6.17 uuid: 8.3.0 webpack: 5.58.1 webpack-filter-warnings-plugin: 1.2.1 @@ -18094,7 +18094,7 @@ __metadata: ts-node: 10.4.0 tslib: 2.3.1 typescript: 4.4.3 - uplot: 1.6.16 + uplot: 1.6.17 uuid: 8.3.0 vendor: "link:./public/vendor" visjs-network: 4.25.0 @@ -32535,6 +32535,13 @@ __metadata: languageName: node linkType: hard +"uplot@npm:1.6.17": + version: 1.6.17 + resolution: "uplot@npm:1.6.17" + checksum: f63d3d4337c12dacc6940fa8e3a8a94416db787e175c715b4975a28fea85f340beb89d3907c83cd1663943d77abd26057098dc8152117d76f8fa184be295edbb + languageName: node + linkType: hard + "upper-case@npm:^1.1.1": version: 1.1.3 resolution: "upper-case@npm:1.1.3"