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
## 2. Include the `zinchart` package in your project
28
+
29
+
The `zingchart` package is a **DIRECT** dependency of `zingchart-react` but you can also update this package outside of this component. Meaning the wrapper is no longer tied to a ZingChart library version, but just the component itself.
30
+
31
+
You can import the library like so:
21
32
22
-
`$ npm install zingchart-react`
33
+
```javascript
34
+
// import the es6 version
35
+
import'zingchart/es6';
36
+
```
23
37
24
-
## 2. Include the component in your project
38
+
## 3. Include the component in your project
25
39
26
40
You can either include the zingchart-react component to your project via UMD or modules (reccomended).
27
41
42
+
28
43
### Modules (reccomended)
29
44
```js
45
+
import'zingchart/es6';
30
46
importZingChartfrom'zingchart-react';
31
47
```
32
48
@@ -35,6 +51,7 @@ wrapped as a closure an eval statement so there is **NO** default
// then you can define global zingchart variables (typically for performance optimization)
60
-
zingchart.DEV.SKIPPROGRESS=1; // skips the intro loading screen (most likely invisible to human eye anyway)
61
-
zingchart.DEV.RESOURCES=0; // indicates to the lib that there are no external resources to load (images)
76
+
// zingchart object for performance flags
62
77
zingchart.DEV.KEEPSOURCE=0; // prevents lib from storing the original data package
63
-
zingchart.DEV.COPYDATA=0; // prevents lib from creating a copy of the data package instead of working with the provided one (which can be altered)
78
+
zingchart.DEV.COPYDATA=0; // prevents lib from creating a copy of the data package
79
+
80
+
// ZC object for license key
81
+
zingchart.LICENSE= ['abcdefghijklmnopqrstuvwxy'];
64
82
```
65
83
66
84
## Usage
@@ -95,6 +113,9 @@ class App extends Component {
95
113
96
114
## Parameters
97
115
116
+
The properties, or parameters, you can pass to the `<zingchart>` tag itself.
117
+
118
+
98
119
### data [object]
99
120
100
121
```jsx
@@ -219,10 +240,11 @@ class App extends Component {
219
240
220
241
For a list of all the methods that you can call and the parameters each method can take, refer to the complete documentation on https://www.zingchart.com/docs/methods
221
242
222
-
## Hello World and Examples
243
+
## Working Example
244
+
223
245
This repository contains a "Create React App" example to give you an easy way to see the component in action.
0 commit comments