Skip to content

Commit 7613ce3

Browse files
committed
no message
1 parent 3b970c5 commit 7613ce3

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22

33
A react-typescript component for Plotly.JS graphs.
44

5-
Self-redraw when props changed.
5+
Self-redraw when props changed and window resize.
66

77
<p align="center">
88
<img src="https://github.com/davidctj/react-plotlyjs-ts/blob/master/images/example.png" />
99
</p>
1010

1111
## Usage
12-
1312
```bash
14-
$ npm install react react-dom typescript plotly.js
15-
$ npm install react-plotlyjs-ts
13+
$ npm install plotly.js react-plotlyjs-ts
1614
```
1715

1816
```typescript
@@ -51,10 +49,11 @@ render(){
5149
}
5250
]
5351
};
54-
return (
55-
<PlotlyChart data={toJS(this.model_data)}
52+
return (
53+
<PlotlyChart data={data}
5654
layout={layout}
57-
onClick={({points, event}) => console.log(points, event)}> )
55+
onClick={({points, event}) => console.log(points, event)}>
56+
)
5857
}
5958
```
6059

0 commit comments

Comments
 (0)