2.0.0 • Published 4 years ago
emvio-chart-util-ui v2.0.0
emvio-chart-util-ui
Utility for generic D3 chart components
Install dependencies
npm install
Run development
This will run webpack watch and automatically rebuild
npm run dev
Run Example App
This will build an example app for testing the component
npm run example
Install
npm install --save git+ssh://git@bitbucket.org/emvio/emvio-chart-util-ui.git#<tag-version>
General Usage
import { EmvioLineChart, EmvioBarChart, emvioCurrencyFormatter, emvioNumberFormatter } from 'emvio-chart-util-ui';
Use this as an element in the jsx
<div style="display:block; width:400px; height:100px;">
<EmvioBarChart
dateRange={this.state.dateRange}
data={barChartData}
dataFormatter={emvioNumberFormatter}
dataField="amount"
/>
<div/>
Data Format
see ./src/mocks for data formats
Adding a component
- Add the component file in src under naming convention:
src/ComponentName/ComponentName.js
- Add the export line to index.js
module.exports.ComponentName = require('./src/ComponentName/ComponentName').default;
Run
npm run dev
Tick version number in package.json
Tag the commit
git tag <version>
Push code & push tags
git push origin <tag>
2.0.0
4 years ago