grafana/docs/sources/packages_api/ui/graphseriestoggler.md
Marcus Andersson cc3fc18076
Docs: enable packages reference docs for 7-beta (#23953)
* added packages reference menu item.

* removed the draft flag.

* Updated docs by running script.
2020-04-28 09:53:58 +02:00

97 lines
2.2 KiB
Markdown

+++
# -----------------------------------------------------------------------
# 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`