+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "GraphSeriesToggler"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++

## GraphSeriesToggler class

<b>Signature</b>

```typescript
export declare class GraphSeriesToggler extends React.Component<GraphSeriesTogglerProps, GraphSeriesTogglerState> 
```
<b>Import</b>

```typescript
import { GraphSeriesToggler } from '@grafana/ui';
```
<b>Constructors</b>

|  Constructor | Modifiers | Description |
|  --- | --- | --- |
|  [constructor(props)](#constructor-props) |  | Constructs a new instance of the <code>GraphSeriesToggler</code> class |

<b>Methods</b>

|  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

<b>Signature</b>

```typescript
constructor(props: GraphSeriesTogglerProps);
```
<b>Parameters</b>

|  Parameter | Type | Description |
|  --- | --- | --- |
|  props | <code>GraphSeriesTogglerProps</code> |  |

### componentDidUpdate method

<b>Signature</b>

```typescript
componentDidUpdate(prevProps: Readonly<GraphSeriesTogglerProps>): void;
```
<b>Parameters</b>

|  Parameter | Type | Description |
|  --- | --- | --- |
|  prevProps | <code>Readonly&lt;GraphSeriesTogglerProps&gt;</code> |  |

<b>Returns:</b>

`void`

### onSeriesToggle method

<b>Signature</b>

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

|  Parameter | Type | Description |
|  --- | --- | --- |
|  label | <code>string</code> |  |
|  event | <code>React.MouseEvent&lt;HTMLElement&gt;</code> |  |

<b>Returns:</b>

`void`

### render method

<b>Signature</b>

```typescript
render(): JSX.Element;
```
<b>Returns:</b>

`JSX.Element`

