GraphNGProps interface
Signature
export interface GraphNGProps extends Themeable2
Import
import { GraphNGProps } from '@grafana/ui';
Properties
Property | Type | Description |
---|---|---|
children | (builder: UPlotConfigBuilder, alignedFrame: DataFrame) => React.ReactNode |
|
fields | XYFieldMatchers |
|
frames | DataFrame[] |
|
height | number |
|
legend | VizLegendOptions |
|
onLegendClick | (event: GraphNGLegendEvent) => void |
|
options | Record<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 |
|
propsToDiff | Array<string | PropDiffFn> |
|
renderers | Renderers |
|
renderLegend | (config: UPlotConfigBuilder) => React.ReactElement | null |
|
structureRev | number |
|
timeRange | TimeRange |
|
timeZone | TimeZone |
|
tweakAxis | (opts: AxisProps, forField: Field) => AxisProps |
|
tweakScale | (opts: ScaleProps, forField: Field) => ScaleProps |
|
width | number |
children property
Signature
children?: (builder: UPlotConfigBuilder, alignedFrame: DataFrame) => React.ReactNode;
fields property
Signature
fields?: XYFieldMatchers;
frames property
Signature
frames: DataFrame[];
height property
Signature
height: number;
legend property
Signature
legend: VizLegendOptions;
onLegendClick property
Signature
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
options?: Record<string, any>;
preparePlotFrame property
Signature
preparePlotFrame?: (frames: DataFrame[], dimFields: XYFieldMatchers) => DataFrame;
prepConfig property
Signature
prepConfig: (alignedFrame: DataFrame, allFrames: DataFrame[], getTimeRange: () => TimeRange) => UPlotConfigBuilder;
propsToDiff property
Signature
propsToDiff?: Array<string | PropDiffFn>;
renderers property
Signature
renderers?: Renderers;
renderLegend property
Signature
renderLegend: (config: UPlotConfigBuilder) => React.ReactElement | null;
structureRev property
Signature
structureRev?: number;
timeRange property
Signature
timeRange: TimeRange;
timeZone property
Signature
timeZone: TimeZone;
tweakAxis property
Signature
tweakAxis?: (opts: AxisProps, forField: Field) => AxisProps;
tweakScale property
Signature
tweakScale?: (opts: ScaleProps, forField: Field) => ScaleProps;
width property
Signature
width: number;
Related Grafana resources
Opening keynote: What's new in Grafana 9?
Raj Dutt, Myrle Krantz, and Torkel Ödegaard unveil what's new in Grafana 9. Watch the opening keynote presentation from GrafanaCONline 2022. On-demand.
Unify your data with Grafana plugins: Splunk, MongoDB, Datadog, and more
Show how Grafana can be used to take data from multiple different sources and unify it, without disrupting the investments that are working today.
Getting started with Grafana Enterprise and observability
Join the Grafana Labs team for a 30-minute demo of how to get started with the Grafana Stack, so you can go from zero to observability in just a few minutes.