File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
A react-typescript component for Plotly.JS graphs.
4
4
5
- Self-redraw when props changed.
5
+ Self-redraw when props changed and window resize.
6
6
7
7
<p align =" center " >
8
8
<img src="https://github.com/davidctj/react-plotlyjs-ts/blob/master/images/example.png" />
9
9
</p >
10
10
11
11
## Usage
12
-
13
12
``` bash
14
- $ npm install react react-dom typescript plotly.js
15
- $ npm install react-plotlyjs-ts
13
+ $ npm install plotly.js react-plotlyjs-ts
16
14
```
17
15
18
16
``` typescript
@@ -51,10 +49,11 @@ render(){
51
49
}
52
50
]
53
51
};
54
- return (
55
- < PlotlyChart data = {toJS(this.model_data) }
52
+ return (
53
+ < PlotlyChart data = {data }
56
54
layout = {layout }
57
- onClick = {({points , event }) => console.log(points , event)}> )
55
+ onClick = {({points , event }) => console.log(points , event)}>
56
+ )
58
57
}
59
58
```
60
59
You can’t perform that action at this time.
0 commit comments