> ## Documentation Index
> Fetch the complete documentation index at: https://dev.writer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Plotly Graph

export const fig_0 = undefined

A component that displays Plotly graphs.

<img src="https://mintcdn.com/writer/mFPGVlLcGxKIh_Y1/framework/public/components/plotlygraph.png?fit=max&auto=format&n=mFPGVlLcGxKIh_Y1&q=85&s=d73f45de15672a4c982cb82acb37ab10" width="740" height="660" data-path="framework/public/components/plotlygraph.png" />

You can listen to events triggered by Plotly.js and add interactivity to your charts.
For example, implement cross-filtering.

## Fields

<table className="componentFields">
  <thead>
    <th>Name</th>
    <th>Type</th>
    <th class="desc">Description</th>
    <th>Options</th>
  </thead>

  <tbody>
    <tr>
      <td>Graph specification</td>
      <td>Object</td>
      <td>Plotly graph specification. Pass it using state, e.g. @{fig_0}, or paste a JSON specification.</td>

      <td>
        <span>-</span>
      </td>
    </tr>

    <tr>
      <td>Custom CSS classes</td>
      <td>Text</td>
      <td>CSS classes, separated by spaces. You can define classes in custom stylesheets.</td>

      <td>
        <span>-</span>
      </td>
    </tr>
  </tbody>
</table>

## Events

<AccordionGroup>
  <Accordion title="plotly-click" icon="code">
    Sends a list with the clicked points.

    ```python theme={null}
    ```
  </Accordion>

  <Accordion title="plotly-selected" icon="code">
    Sends a list with the selected points.

    ```python theme={null}
    ```
  </Accordion>

  <Accordion title="plotly-deselect" icon="code">
    Triggered when points are deselected.

    ```python theme={null}
    ```
  </Accordion>
</AccordionGroup>

<events />
