You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+85-4Lines changed: 85 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,8 @@ Official minimal [Highcharts](https://www.highcharts.com/) wrapper for React.
17
17
3.[constructorType](#constructorType)
18
18
4.[allowChartUpdate](#allowChartUpdate)
19
19
5.[updateArgs](#updateArgs)
20
-
6.[callback](#callback)
20
+
6.[containerProps](#containerProps)
21
+
7.[callback](#callback)
21
22
3.[Example with custom chart component](#example-with-custom-chart-component)
22
23
4.[Get repository](#get-repository)
23
24
5.[Examples](#examples)
@@ -32,7 +33,7 @@ Make sure you have **node**, **NPM** and **React** up to date.
32
33
Tested and required versions:
33
34
34
35
* node 8.11.3+
35
-
* npm 6.4.1+
36
+
* npm 6.4.1+ or similar package manager
36
37
* React 16.4+
37
38
38
39
### Installing
@@ -181,6 +182,7 @@ Available options:
181
182
constructorType={'mapChart'}
182
183
allowChartUpdate={update}
183
184
updateArgs={[true, true, true]}
185
+
containerProps={{className:'chartContainer'}}
184
186
callback={this.chartCallback}
185
187
/>
186
188
```
@@ -212,6 +214,10 @@ Option `allowChartUpdate` allow to turn off the updating. This options is option
212
214
213
215
Array of `update()`'s function optional arguments. Parameters should be defined in the same order like in native Highcharts function: `[redraw, oneToOne, animation]`, in this wrapper defaults to `[true, true, true]`. [Here](https://api.highcharts.com/class-reference/Highcharts.Chart#update) is a more specific description of the parameters. This option is optional.
214
216
217
+
### containerProps
218
+
219
+
The props object passed to the chart container in `React.createElement` method. Useful for adding styles or class.
220
+
215
221
### callback
216
222
217
223
A callback function for the created chart. First argument for the function will hold the created `chart`. Default `this` in the function points to the `chart`. This option is optional.
@@ -275,7 +281,7 @@ npm install highcharts
275
281
276
282
## Examples
277
283
278
-
There are several interesting examples in the demo folder that use all available constructors and a few modules.
284
+
There are several interesting examples in the demo folder that use all available constructors and several modules.
279
285
280
286
Bundle these with:
281
287
@@ -285,6 +291,8 @@ npm run build-demo
285
291
286
292
Demo is located under demo/index.html
287
293
294
+
Live example on codesandbox: https://codesandbox.io/s/rmjw8347po
295
+
288
296
## Tests
289
297
290
298
This wrapper contains tests for: testing environment, chart rendering and passing down container props.
@@ -298,10 +306,83 @@ npm run test
298
306
299
307
### Where to look for help?
300
308
301
-
[Technical support](https://www.highcharts.com/support) will help you with Highcharts and the wrapper.
309
+
[Technical support](https://www.highcharts.com/support) will help you with Highcharts and with the wrapper.
302
310
303
311
If you have a bug to report or an enhancement suggestion please submit [Issues](https://github.com/highcharts/highcharts-react/issues) in this repository.
304
312
305
313
### Why highcharts-react-official, and not highcharts-react, is used?
306
314
307
315
The NPM package is registered as `highcharts-react-official` because `highcharts-react` was already taken.
0 commit comments