Skip to content

Commit 8a7c210

Browse files
authored
Merge pull request #4 from matthiaseigner/additional-events
Additional event listener
2 parents d106e54 + 8176b98 commit 8a7c210

File tree

3 files changed

+415
-188
lines changed

3 files changed

+415
-188
lines changed

dist/index.d.ts

Lines changed: 52 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,52 @@
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;
1+
import * as plotly from 'plotly.js';
2+
import * as React from 'react';
3+
export interface IPlotlyChartProps {
4+
config?: any;
5+
data: any;
6+
layout?: any;
7+
onAfterExport?: () => void;
8+
onAfterPlot?: () => void;
9+
onAnimated?: () => void;
10+
onAnimatingFrame?: (event: plotly.FrameAnimationEvent) => void;
11+
onAnimationInterrupted?: () => void;
12+
onAutoSize?: () => void;
13+
onBeforeExport?: () => void;
14+
onClick?: (event: plotly.PlotMouseEvent) => void;
15+
onClickAnnotation?: (event: plotly.ClickAnnotationEvent) => void;
16+
onDeselect?: () => void;
17+
onDoubleClick?: () => void;
18+
onFramework?: () => void;
19+
onHover?: (event: plotly.PlotMouseEvent) => void;
20+
onLegendClick?: (event: plotly.LegendClickEvent) => boolean;
21+
onLegendDoubleClick?: (event: plotly.LegendClickEvent) => boolean;
22+
onRelayout?: (event: plotly.PlotRelayoutEvent) => void;
23+
onRestyle?: (evemt: plotly.PlotRestyleEvent) => void;
24+
onRedraw?: () => void;
25+
onSelected?: (event: plotly.PlotSelectionEvent) => void;
26+
onSelecting?: (event: plotly.PlotSelectionEvent) => void;
27+
onSliderChange?: (event: plotly.SliderChangeEvent) => void;
28+
onSliderEnd?: (event: plotly.SliderEndEvent) => void;
29+
onSliderStart?: (event: plotly.SliderEndEvent) => void;
30+
onTransitioning?: () => void;
31+
onTransitionInterrupted?: () => void;
32+
onUnHover?: (event: plotly.PlotMouseEvent) => void;
33+
onEvent?: (data: any) => void;
34+
onBeforePlot?: (event: plotly.BeforePlotEvent) => void;
35+
}
36+
/***
37+
* Usage:
38+
* <PlotlyChart data={toJS(this.model_data)}
39+
* layout={layout}
40+
* onClick={({points, event}) => console.log(points, event)}>
41+
*/
42+
declare class PlotlyChart extends React.Component<IPlotlyChartProps, any> {
43+
container: plotly.PlotlyHTMLElement | null;
44+
attachListeners(): void;
45+
resize: () => void;
46+
draw: (props: IPlotlyChartProps) => Promise<void>;
47+
componentWillReceiveProps(nextProps: IPlotlyChartProps): void;
48+
componentDidMount(): void;
49+
componentWillUnmount(): void;
50+
render(): JSX.Element;
51+
}
52+
export default PlotlyChart;

0 commit comments

Comments
 (0)