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

GraphNG class

“Time as X” core component, expectes ascending x

Signature

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

Import

typescript
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

typescript
constructor(props: GraphNGProps);

Parameters

ParameterTypeDescription
propsGraphNGProps

contextType property

Signature

typescript
static contextType: React.Context<PanelContext>;

getTimeRange property

Signature

typescript
getTimeRange: () => TimeRange;

panelContext property

Signature

typescript
panelContext: PanelContext;

componentDidMount method

Signature

typescript
componentDidMount(): void;

Returns:

void

componentDidUpdate method

Signature

typescript
componentDidUpdate(prevProps: GraphNGProps): void;

Parameters

ParameterTypeDescription
prevPropsGraphNGProps

Returns:

void

componentWillUnmount method

Signature

typescript
componentWillUnmount(): void;

Returns:

void

prepState method

Signature

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

Parameters

ParameterTypeDescription
propsGraphNGProps
withConfigboolean

Returns:

GraphNGState

render method

Signature

typescript
render(): JSX.Element | null;

Returns:

JSX.Element | null