|
1 |
| -/// <reference types="react" /> |
2 |
| -import * as plotly from 'plotly.js'; |
3 |
| -import * as React from 'react'; |
4 |
| -export interface IPlotlyChartProps { |
5 |
| - config?: plotly.Config; |
6 |
| - data: Partial<plotly.ScatterData>[]; |
7 |
| - layout?: plotly.Layout; |
8 |
| - onClick?: (event: plotly.PlotMouseEvent) => void; |
9 |
| - onBeforeHover?: (event: plotly.PlotMouseEvent) => void; |
10 |
| - onHover?: (event: plotly.PlotMouseEvent) => void; |
11 |
| - onUnHover?: (event: plotly.PlotMouseEvent) => void; |
12 |
| - onSelected?: (event: plotly.PlotSelectionEvent) => void; |
13 |
| -} |
14 |
| -/*** |
15 |
| - * Usage: |
16 |
| - * <PlotlyChart data={toJS(this.model_data)} |
17 |
| - * layout={layout} |
18 |
| - * onClick={({points, event}) => console.log(points, event)}> |
19 |
| - */ |
20 |
| -declare class PlotlyChart extends React.Component<IPlotlyChartProps, any> { |
21 |
| - container: plotly.PlotlyHTMLElement | null; |
22 |
| - attachListeners(): void; |
23 |
| - resize: () => void; |
24 |
| - draw: (props: IPlotlyChartProps) => Promise<void>; |
25 |
| - componentWillReceiveProps(nextProps: IPlotlyChartProps): void; |
26 |
| - componentDidMount(): void; |
27 |
| - componentWillUnmount(): void; |
28 |
| - render(): JSX.Element; |
29 |
| -} |
30 |
| -export default PlotlyChart; |
| 1 | +/// <reference types="react" /> |
| 2 | +import * as plotly from 'plotly.js'; |
| 3 | +import * as React from 'react'; |
| 4 | +export interface IPlotlyChartProps { |
| 5 | + config?: any; |
| 6 | + data: any; |
| 7 | + layout?: any; |
| 8 | + onClick?: (event: plotly.PlotMouseEvent) => void; |
| 9 | + onBeforeHover?: (event: plotly.PlotMouseEvent) => void; |
| 10 | + onHover?: (event: plotly.PlotMouseEvent) => void; |
| 11 | + onUnHover?: (event: plotly.PlotMouseEvent) => void; |
| 12 | + onSelected?: (event: plotly.PlotSelectionEvent) => void; |
| 13 | +} |
| 14 | +/*** |
| 15 | + * Usage: |
| 16 | + * <PlotlyChart data={toJS(this.model_data)} |
| 17 | + * layout={layout} |
| 18 | + * onClick={({points, event}) => console.log(points, event)}> |
| 19 | + */ |
| 20 | +declare class PlotlyChart extends React.Component<IPlotlyChartProps, any> { |
| 21 | + container: plotly.PlotlyHTMLElement | null; |
| 22 | + attachListeners(): void; |
| 23 | + resize: () => void; |
| 24 | + draw: (props: IPlotlyChartProps) => Promise<void>; |
| 25 | + componentWillReceiveProps(nextProps: IPlotlyChartProps): void; |
| 26 | + componentDidMount(): void; |
| 27 | + componentWillUnmount(): void; |
| 28 | + render(): JSX.Element; |
| 29 | +} |
| 30 | +export default PlotlyChart; |
0 commit comments