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

GraphSeriesToggler class

Signature

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

Import

typescript
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

typescript
constructor(props: GraphSeriesTogglerProps);

Parameters

ParameterTypeDescription
propsGraphSeriesTogglerProps

componentDidUpdate method

Signature

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

Parameters

ParameterTypeDescription
prevPropsReadonly<GraphSeriesTogglerProps>

Returns:

void

onSeriesToggle method

Signature

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

Parameters

ParameterTypeDescription
labelstring
eventReact.MouseEvent<HTMLElement>

Returns:

void

render method

Signature

typescript
render(): JSX.Element;

Returns:

JSX.Element