+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "GraphSeriesToggler"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## GraphSeriesToggler class
Signature
```typescript
export declare class GraphSeriesToggler extends React.Component
```
Import
```typescript
import { GraphSeriesToggler } from '@grafana/ui';
```
Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [constructor(props)](#constructor-props) | | Constructs a new instance of the GraphSeriesToggler
class |
Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [componentDidUpdate(prevProps)](#componentdidupdate-method) | | |
| [onSeriesToggle(label, event)](#onseriestoggle-method) | | |
| [render()](#render-method) | | |
### constructor(props)
Constructs a new instance of the `GraphSeriesToggler` class
Signature
```typescript
constructor(props: GraphSeriesTogglerProps);
```
Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| props | GraphSeriesTogglerProps
| |
### componentDidUpdate method
Signature
```typescript
componentDidUpdate(prevProps: Readonly): void;
```
Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| prevProps | Readonly<GraphSeriesTogglerProps>
| |
Returns:
`void`
### onSeriesToggle method
Signature
```typescript
onSeriesToggle(label: string, event: React.MouseEvent): void;
```
Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| label | string
| |
| event | React.MouseEvent<HTMLElement>
| |
Returns:
`void`
### render method
Signature
```typescript
render(): JSX.Element;
```
Returns:
`JSX.Element`