diff --git a/packages/grafana-ui/src/components/index.scss b/packages/grafana-ui/src/components/index.scss index 2042620b8847..e870c298c389 100644 --- a/packages/grafana-ui/src/components/index.scss +++ b/packages/grafana-ui/src/components/index.scss @@ -12,3 +12,4 @@ @import 'TimePicker/TimeOfDayPicker'; @import 'Tooltip/Tooltip'; @import 'Slider/Slider'; +@import 'uPlot/Plot'; diff --git a/packages/grafana-ui/src/components/uPlot/Plot.scss b/packages/grafana-ui/src/components/uPlot/Plot.scss new file mode 100644 index 000000000000..12e1987f7db2 --- /dev/null +++ b/packages/grafana-ui/src/components/uPlot/Plot.scss @@ -0,0 +1,2 @@ +// importing the uPlot css so it will be bundled with the rest of the styling. +@import '../../node_modules/uplot/dist/uPlot.min.css'; diff --git a/packages/grafana-ui/src/components/uPlot/Plot.tsx b/packages/grafana-ui/src/components/uPlot/Plot.tsx index 78b9eed3a549..8978a763aa11 100644 --- a/packages/grafana-ui/src/components/uPlot/Plot.tsx +++ b/packages/grafana-ui/src/components/uPlot/Plot.tsx @@ -1,4 +1,3 @@ -import 'uplot/dist/uPlot.min.css'; import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'; import { css } from 'emotion'; import uPlot from 'uplot'; diff --git a/packages/grafana-ui/src/components/uPlot/types.ts b/packages/grafana-ui/src/components/uPlot/types.ts index dbd6d81c26e9..4026d8a6c151 100644 --- a/packages/grafana-ui/src/components/uPlot/types.ts +++ b/packages/grafana-ui/src/components/uPlot/types.ts @@ -1,7 +1,8 @@ import React from 'react'; import uPlot from 'uplot'; import { DataFrame, FieldColor, TimeRange, TimeZone } from '@grafana/data'; -import { NullValuesMode } from '../../../../../public/app/plugins/panel/graph3/types'; + +export type NullValuesMode = 'null' | 'connected' | 'asZero'; export enum MicroPlotAxisSide { top = 0, diff --git a/public/app/plugins/panel/graph3/types.ts b/public/app/plugins/panel/graph3/types.ts index 0b7cc5b6890b..72b8e87b97df 100644 --- a/public/app/plugins/panel/graph3/types.ts +++ b/public/app/plugins/panel/graph3/types.ts @@ -1,6 +1,5 @@ import { LegendOptions, GraphTooltipOptions } from '@grafana/ui'; -export type NullValuesMode = 'null' | 'connected' | 'asZero'; export type LegendPlacement = 'top' | 'bottom' | 'left' | 'right'; export interface GraphOptions {