API Reference@grafana/uiGraphSeriesToggler

GraphSeriesToggler class

Signature

export declare class GraphSeriesToggler extends React.Component<GraphSeriesTogglerProps, GraphSeriesTogglerState> 

Import

import { GraphSeriesToggler } from '@grafana/ui';

Constructors

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

Methods

MethodModifiersDescription
componentDidUpdate(prevProps)
onSeriesToggle(label, event)
render()

constructor(props)

Constructs a new instance of the GraphSeriesToggler class

Signature

constructor(props: GraphSeriesTogglerProps);

Parameters

ParameterTypeDescription
propsGraphSeriesTogglerProps

componentDidUpdate method

Signature

componentDidUpdate(prevProps: Readonly<GraphSeriesTogglerProps>): void;

Parameters

ParameterTypeDescription
prevPropsReadonly<GraphSeriesTogglerProps>

Returns:

void

onSeriesToggle method

Signature

onSeriesToggle(label: string, event: React.MouseEvent<HTMLElement>): void;

Parameters

ParameterTypeDescription
labelstring
eventReact.MouseEvent<HTMLElement>

Returns:

void

render method

Signature

render(): JSX.Element;

Returns:

JSX.Element