UPlotConfigBuilder class

Signature

  1. export declare class UPlotConfigBuilder

Import

  1. import { UPlotConfigBuilder } from '@grafana/ui';

Constructors

ConstructorModifiersDescription
constructor(timeZone)Constructs a new instance of the UPlotConfigBuilder class

Properties

PropertyModifiersTypeDescription
prepDataPrepData | undefined
scaleKeys[string, string]

Methods

MethodModifiersDescription
addAxis(props)
addBand(band)
addHook(type, hook)
addScale(props)Add or update the scale with the scale key
addSeries(props)
addThresholds(options)
getAxisPlacement(scaleKey)
getConfig()
getSeries()
getStackingGroups()
getTooltipInterpolator()
hasSync()
setCursor(cursor)
setMode(mode)
setPadding(padding)
setPrepData(prepData)
setSelect(select)
setStackingGroups(groups)
setSync()
setTooltipInterpolator(interpolator)

constructor(timeZone)

Constructs a new instance of the UPlotConfigBuilder class

Signature

  1. constructor(timeZone?: TimeZone);

Parameters

ParameterTypeDescription
timeZoneTimeZone

prepData property

Signature

  1. prepData: PrepData | undefined;

scaleKeys property

Signature

  1. scaleKeys: [string, string];

addAxis method

Signature

  1. addAxis(props: AxisProps): void;

Parameters

ParameterTypeDescription
propsAxisProps

Returns:

void

addBand method

Signature

  1. addBand(band: Band): void;

Parameters

ParameterTypeDescription
bandBand

Returns:

void

addHook method

Signature

  1. addHook<T extends keyof Hooks.Defs>(type: T, hook: Hooks.Defs[T]): void;

Parameters

ParameterTypeDescription
typeT
hookHooks.Defs[T]

Returns:

void

addScale method

Add or update the scale with the scale key

Signature

  1. addScale(props: ScaleProps): void;

Parameters

ParameterTypeDescription
propsScaleProps

Returns:

void

addSeries method

Signature

  1. addSeries(props: SeriesProps): void;

Parameters

ParameterTypeDescription
propsSeriesProps

Returns:

void

addThresholds method

Signature

  1. addThresholds(options: UPlotThresholdOptions): void;

Parameters

ParameterTypeDescription
optionsUPlotThresholdOptions

Returns:

void

getAxisPlacement method

Signature

  1. getAxisPlacement(scaleKey: string): AxisPlacement;

Parameters

ParameterTypeDescription
scaleKeystring

Returns:

AxisPlacement

getConfig method

Signature

  1. getConfig(): PlotConfig;

Returns:

PlotConfig

getSeries method

Signature

  1. getSeries(): UPlotSeriesBuilder[];

Returns:

UPlotSeriesBuilder[]

getStackingGroups method

Signature

  1. getStackingGroups(): StackingGroup[];

Returns:

StackingGroup[]

getTooltipInterpolator method

Signature

  1. getTooltipInterpolator(): PlotTooltipInterpolator | undefined;

Returns:

PlotTooltipInterpolator | undefined

hasSync method

Signature

  1. hasSync(): boolean;

Returns:

boolean

setCursor method

Signature

  1. setCursor(cursor?: Cursor): void;

Parameters

ParameterTypeDescription
cursorCursor

Returns:

void

setMode method

Signature

  1. setMode(mode: uPlot.Mode): void;

Parameters

ParameterTypeDescription
modeuPlot.Mode

Returns:

void

setPadding method

Signature

  1. setPadding(padding: Padding): void;

Parameters

ParameterTypeDescription
paddingPadding

Returns:

void

setPrepData method

Signature

  1. setPrepData(prepData: PreDataStacked): void;

Parameters

ParameterTypeDescription
prepDataPreDataStacked

Returns:

void

setSelect method

Signature

  1. setSelect(select: Select): void;

Parameters

ParameterTypeDescription
selectSelect

Returns:

void

setStackingGroups method

Signature

  1. setStackingGroups(groups: StackingGroup[]): void;

Parameters

ParameterTypeDescription
groupsStackingGroup[]

Returns:

void

setSync method

Signature

  1. setSync(): void;

Returns:

void

setTooltipInterpolator method

Signature

  1. setTooltipInterpolator(interpolator: PlotTooltipInterpolator): void;

Parameters

ParameterTypeDescription
interpolatorPlotTooltipInterpolator

Returns:

void