Skip to content

Commit

Permalink
v2.1.2
Browse files Browse the repository at this point in the history
- add zingchart window object to the export
  • Loading branch information
Nick Ardecky committed May 28, 2020
1 parent 1007f0e commit 3d08af0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ In your main html file, include the package as a script include.
<script src="/path/to/zingchart-react.js"></script>
```

### Others

If you need access to the `window.ZC` and `window.zingchart` objects we have
exported those as well. Here is how to import them.

```javascript
// export ZingChart react class then the ZC and zingchart window ojects
import {default as ZingChart, zingchart, ZC} from 'zingchart-react';

// then you can define global zingchart variables (typically for performance optimization)
zingchart.DEV.SKIPPROGRESS = 1; // skips the intro loading screen (most likely invisible to human eye anyway)
zingchart.DEV.RESOURCES = 0; // indicates to the lib that there are no external resources to load (images)
zingchart.DEV.KEEPSOURCE = 0; // prevents lib from storing the original data package
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)
```

## Usage

Expand Down
1 change: 1 addition & 0 deletions dist/zingchart-react.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/zingchart-react.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zingchart-react",
"version": "2.1.1",
"version": "2.1.2",
"description": "ZingChart React Component wrapper to allow native react syntax for events, methods and styling.",
"author": "ZingSoft Inc.",
"license": "MIT",
Expand Down
3 changes: 2 additions & 1 deletion src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,5 @@ class ZingChart extends Component {
}

let ZC = window.ZC;
export {ZingChart as default, ZC};
// export ZingChart react class, ZC and zingchart window ojects
export {ZingChart as default, ZC, zingchart};

0 comments on commit 3d08af0

Please sign in to comment.