Menu
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Enterprise
Open source
GraphNGProps interface
Signature
typescript
export interface GraphNGProps extends Themeable2
Import
typescript
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
typescript
children?: (builder: UPlotConfigBuilder, alignedFrame: DataFrame) => React.ReactNode;
fields property
Signature
typescript
fields?: XYFieldMatchers;
frames property
Signature
typescript
frames: DataFrame[];
height property
Signature
typescript
height: number;
legend property
Signature
typescript
legend: VizLegendOptions;
onLegendClick property
Signature
typescript
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
typescript
options?: Record<string, any>;
preparePlotFrame property
Signature
typescript
preparePlotFrame?: (frames: DataFrame[], dimFields: XYFieldMatchers) => DataFrame;
prepConfig property
Signature
typescript
prepConfig: (alignedFrame: DataFrame, allFrames: DataFrame[], getTimeRange: () => TimeRange) => UPlotConfigBuilder;
propsToDiff property
Signature
typescript
propsToDiff?: Array<string | PropDiffFn>;
renderers property
Signature
typescript
renderers?: Renderers;
renderLegend property
Signature
typescript
renderLegend: (config: UPlotConfigBuilder) => React.ReactElement | null;
structureRev property
Signature
typescript
structureRev?: number;
timeRange property
Signature
typescript
timeRange: TimeRange;
timeZone property
Signature
typescript
timeZone: TimeZone;
tweakAxis property
Signature
typescript
tweakAxis?: (opts: AxisProps, forField: Field) => AxisProps;
tweakScale property
Signature
typescript
tweakScale?: (opts: ScaleProps, forField: Field) => ScaleProps;
width property
Signature
typescript
width: number;
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:

Getting started with the Grafana LGTM Stack
In this webinar, we’ll demo how to get started using the LGTM Stack: Loki for logs, Grafana for visualization, Tempo for traces, and Mimir for metrics.

Getting started with Grafana dashboard design (EMEA Timezone)
In this webinar, you'll learn how to design stylish and easily accessible Grafana dashboards that tell a story.

Unify your data with Grafana plugins: Datadog, Splunk, MongoDB, and more
In this webinar, learn how to leverage Grafana's plugin ecosystem for access to 80+ data sources, including plugins for Datadog, Splunk, MongoDB, and more.