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
+32-13Lines changed: 32 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ How to install
8
8
"devDependencies": {
9
9
"react": "^15.4.2",
10
10
"react-dom": "^15.4.2",
11
-
"@amcharts/amcharts3-react": "^2.0.0"
11
+
"@amcharts/amcharts3-react": "^3.0.0"
12
12
}
13
13
}
14
14
```
@@ -44,24 +44,37 @@ How to use
44
44
45
45
```js
46
46
React.createElement(AmCharts.React, {
47
-
"type":"serial",
48
-
"theme":"light",
49
-
"graphs": [...],
50
-
"dataProvider": [...]
47
+
style: {
48
+
width:"100%",
49
+
height:"500px"
50
+
},
51
+
options: {
52
+
"type":"serial",
53
+
"theme":"light",
54
+
"graphs": [...],
55
+
"dataProvider": [...]
56
+
}
51
57
})
52
58
```
53
59
54
60
Or alternatively if you are using JSX:
55
61
56
62
```js
57
63
<AmCharts.React
58
-
type="serial"
59
-
theme="light"
60
-
graphs={[...]}
61
-
dataProvider={[...]} />
64
+
style={{
65
+
width:"100%",
66
+
height:"500px"
67
+
}}
68
+
options={{
69
+
"type":"serial",
70
+
"theme":"light",
71
+
"graphs": [...],
72
+
"dataProvider": [...]
73
+
}}
74
+
/>
62
75
```
63
76
64
-
You can also pass the entire config object:
77
+
You can also define the options object separately:
65
78
66
79
```js
67
80
var config = {
@@ -71,12 +84,12 @@ var config = {
71
84
"dataProvider": [...]
72
85
};
73
86
74
-
<AmCharts.React{...config} />
87
+
<AmCharts.Reactoptions={config} />
75
88
```
76
89
77
-
The configuration is exactly the same as the [`AmCharts.makeChart`](https://docs.amcharts.com/3/javascriptcharts/AmCharts#makeChart) method.
90
+
The `options` property supports exactly the same configuration as the [`AmCharts.makeChart`](https://docs.amcharts.com/3/javascriptcharts/AmCharts#makeChart) method, so all of the [AmCharts demos](https://www.amcharts.com/demos/) work the same.
78
91
79
-
Changes to the configuration are automatically detected when rendering (you do not need to call [`validateNow`](https://docs.amcharts.com/3/javascriptcharts/AmSerialChart#validateNow) or [`validateData`](https://docs.amcharts.com/3/javascriptcharts/AmSerialChart#validateData)).
92
+
Changes to `options`are automatically detected when rendering (you do *not* need to call [`validateNow`](https://docs.amcharts.com/3/javascriptcharts/AmSerialChart#validateNow) or [`validateData`](https://docs.amcharts.com/3/javascriptcharts/AmSerialChart#validateData)).
80
93
81
94
In addition, this plugin automatically generates an `id`, so you do not need to specify it.
82
95
@@ -99,6 +112,12 @@ You can see an example program in the `examples/webpack-export` folder. It updat
99
112
100
113
## Changelog
101
114
115
+
### 3.0.0
116
+
117
+
* Rather than passing in the configuration directly, instead you must pass in the configuration using the new `options` property.
118
+
119
+
* Adding in `delay` property for controlling the chart delay.
120
+
102
121
### 2.0.7
103
122
104
123
* Reverting the code which waits for the chart to initialize.
0 commit comments