GraphNG class

“Time as X” core component, expectes ascending x

Signature

  1. export declare class GraphNG extends React.Component<GraphNGProps, GraphNGState>

Import

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

Constructors

ConstructorModifiersDescription
constructor(props)Constructs a new instance of the GraphNG class

Properties

PropertyModifiersTypeDescription
contextTypestaticReact.Context<PanelContext>
getTimeRange() => TimeRange
panelContextPanelContext

Methods

MethodModifiersDescription
componentDidMount()
componentDidUpdate(prevProps)
componentWillUnmount()
prepState(props, withConfig)
render()

constructor(props)

Constructs a new instance of the GraphNG class

Signature

  1. constructor(props: GraphNGProps);

Parameters

ParameterTypeDescription
propsGraphNGProps

contextType property

Signature

  1. static contextType: React.Context<PanelContext>;

getTimeRange property

Signature

  1. getTimeRange: () => TimeRange;

panelContext property

Signature

  1. panelContext: PanelContext;

componentDidMount method

Signature

  1. componentDidMount(): void;

Returns:

void

componentDidUpdate method

Signature

  1. componentDidUpdate(prevProps: GraphNGProps): void;

Parameters

ParameterTypeDescription
prevPropsGraphNGProps

Returns:

void

componentWillUnmount method

Signature

  1. componentWillUnmount(): void;

Returns:

void

prepState method

Signature

  1. prepState(props: GraphNGProps, withConfig?: boolean): GraphNGState;

Parameters

ParameterTypeDescription
propsGraphNGProps
withConfigboolean

Returns:

GraphNGState

render method

Signature

  1. render(): JSX.Element | null;

Returns:

JSX.Element | null