Skip to content

Commit 3d08af0

Browse files
author
Nick Ardecky
committed
v2.1.2
- add zingchart window object to the export
1 parent 1007f0e commit 3d08af0

File tree

5 files changed

+20
-3
lines changed

5 files changed

+20
-3
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,21 @@ In your main html file, include the package as a script include.
4646
<script src="/path/to/zingchart-react.js"></script>
4747
```
4848

49+
### Others
50+
51+
If you need access to the `window.ZC` and `window.zingchart` objects we have
52+
exported those as well. Here is how to import them.
53+
54+
```javascript
55+
// export ZingChart react class then the ZC and zingchart window ojects
56+
import {default as ZingChart, zingchart, ZC} from 'zingchart-react';
57+
58+
// then you can define global zingchart variables (typically for performance optimization)
59+
zingchart.DEV.SKIPPROGRESS = 1; // skips the intro loading screen (most likely invisible to human eye anyway)
60+
zingchart.DEV.RESOURCES = 0; // indicates to the lib that there are no external resources to load (images)
61+
zingchart.DEV.KEEPSOURCE = 0; // prevents lib from storing the original data package
62+
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)
63+
```
4964

5065
## Usage
5166

dist/zingchart-react.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/zingchart-react.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zingchart-react",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"description": "ZingChart React Component wrapper to allow native react syntax for events, methods and styling.",
55
"author": "ZingSoft Inc.",
66
"license": "MIT",

src/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,5 @@ class ZingChart extends Component {
109109
}
110110

111111
let ZC = window.ZC;
112-
export {ZingChart as default, ZC};
112+
// export ZingChart react class, ZC and zingchart window ojects
113+
export {ZingChart as default, ZC, zingchart};

0 commit comments

Comments
 (0)