chartogram
Advanced tools
Comparing version 0.1.21 to 0.1.22
{ | ||
"name": "chartogram", | ||
"version": "0.1.21", | ||
"version": "0.1.22", | ||
"description": "Charts in JS with no dependencies", | ||
@@ -5,0 +5,0 @@ "main": "index.commonjs.js", |
'use strict' | ||
exports = module.exports = require('../commonjs/React').default | ||
exports['default'] = require('../commonjs/React').default | ||
exports = module.exports = require('../commonjs/react/Chartogram').default | ||
exports['default'] = require('../commonjs/react/Chartogram').default |
@@ -1,1 +0,1 @@ | ||
export { default } from '../modules/React' | ||
export { default } from '../modules/react/Chartogram' |
@@ -111,3 +111,3 @@ # chartogram | ||
### React | ||
### Bundler | ||
@@ -119,2 +119,15 @@ ``` | ||
```js | ||
import chartogram from 'chartogram' | ||
import 'chartogram/style.css' | ||
chartogram(element, data, title) | ||
``` | ||
### React (bundler) | ||
``` | ||
npm install chartogram --save | ||
``` | ||
```js | ||
import React from 'react' | ||
@@ -136,2 +149,38 @@ import Chartogram from 'chartogram/react' | ||
### React (browser) | ||
```html | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="https://unpkg.com/chartogram@[version]/bundle/chartogram-react.js"></script> | ||
<link rel="stylesheet" href="https://unpkg.com/chartogram@[version]/style.css"/> | ||
</head> | ||
<body> | ||
<section id="page"></section> | ||
<script> | ||
class Page extends React.Component { | ||
render() { | ||
return ( | ||
<Chartogram | ||
data={data} | ||
title="Followers" | ||
options={options}/> | ||
) | ||
} | ||
} | ||
ReactDOM.render( | ||
<Page/>, | ||
document.getElementById("page") | ||
) | ||
</script> | ||
</body> | ||
</html> | ||
``` | ||
where `[version]` is an npm package version range (for example, `0.1.x` or `^0.1.0`). | ||
## Night mode | ||
@@ -138,0 +187,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
244
1430389
63