GraphNGProps interface

Signature

  1. export interface GraphNGProps extends Themeable2

Import

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

Properties

PropertyTypeDescription
children(builder: UPlotConfigBuilder, alignedFrame: DataFrame) => React.ReactNode
fieldsXYFieldMatchers
framesDataFrame[]
heightnumber
legendVizLegendOptions
onLegendClick(event: GraphNGLegendEvent) => void
optionsRecord<string, any>needed for propsToDiff to re-init the plot & config this is a generic approach to plot re-init, without having to specify which panel-level options should cause invalidation. we can drop this in favor of something like panelOptionsRev that gets passed in similar to structureRev. then we can drop propsToDiff entirely.
preparePlotFrame(frames: DataFrame[], dimFields: XYFieldMatchers) => DataFrame
prepConfig(alignedFrame: DataFrame, allFrames: DataFrame[], getTimeRange: () => TimeRange) => UPlotConfigBuilder
propsToDiffArray<string | PropDiffFn>
renderersRenderers
renderLegend(config: UPlotConfigBuilder) => React.ReactElement | null
structureRevnumber
timeRangeTimeRange
timeZoneTimeZone[] | TimeZone
tweakAxis(opts: AxisProps, forField: Field) => AxisProps
tweakScale(opts: ScaleProps, forField: Field) => ScaleProps
widthnumber

children property

Signature

  1. children?: (builder: UPlotConfigBuilder, alignedFrame: DataFrame) => React.ReactNode;

fields property

Signature

  1. fields?: XYFieldMatchers;

frames property

Signature

  1. frames: DataFrame[];

height property

Signature

  1. height: number;

legend property

Signature

  1. legend: VizLegendOptions;

onLegendClick property

Signature

  1. onLegendClick?: (event: GraphNGLegendEvent) => void;

options property

needed for propsToDiff to re-init the plot & config this is a generic approach to plot re-init, without having to specify which panel-level options should cause invalidation. we can drop this in favor of something like panelOptionsRev that gets passed in similar to structureRev. then we can drop propsToDiff entirely.

Signature

  1. options?: Record<string, any>;

preparePlotFrame property

Signature

  1. preparePlotFrame?: (frames: DataFrame[], dimFields: XYFieldMatchers) => DataFrame;

prepConfig property

Signature

  1. prepConfig: (alignedFrame: DataFrame, allFrames: DataFrame[], getTimeRange: () => TimeRange) => UPlotConfigBuilder;

propsToDiff property

Signature

  1. propsToDiff?: Array<string | PropDiffFn>;

renderers property

Signature

  1. renderers?: Renderers;

renderLegend property

Signature

  1. renderLegend: (config: UPlotConfigBuilder) => React.ReactElement | null;

structureRev property

Signature

  1. structureRev?: number;

timeRange property

Signature

  1. timeRange: TimeRange;

timeZone property

Signature

  1. timeZone: TimeZone[] | TimeZone;

tweakAxis property

Signature

  1. tweakAxis?: (opts: AxisProps, forField: Field) => AxisProps;

tweakScale property

Signature

  1. tweakScale?: (opts: ScaleProps, forField: Field) => ScaleProps;

width property

Signature

  1. width: number;