We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a00545 commit ec56f29Copy full SHA for ec56f29
README.md
@@ -86,13 +86,15 @@ Chart.js instance can be accessed by placing a ref to the element as:
86
87
```js
88
89
+chartReference = {};
90
+
91
componentDidMount() {
- console.log(this.refs.chart.chartInstance); // returns a Chart.js instance reference
92
+ console.log(this.chartReference); // returns a Chart.js instance reference
93
}
94
95
render() {
96
return (
- <Doughnut ref='chart' data={data} />
97
+ <Doughnut ref={(reference) => this.chartReference = reference } data={data} />
98
)
99
100
```
0 commit comments