react-barchart-envelope
v0.2.0
Published
React component for simple barchart envelope
Downloads
17
Maintainers
Readme
react-barchart-envelope
React component for simple barchart envelope

Demo
http://fraserxu.me/react-barchart-envelope/
Installation
$ npm install react-barchart-envelope --saveUsage
var React = require('react')
var BarchartEnvelope = require('react-barchart-envelope')
var Graph = React.createClass({
render: function() {
var data = [15, 12, 25, 8, 20, 14, 15, 3, 9, 29, 23, 12, 10, 26, 17, 25, 4, 29, 23, 12, 10, 26, 17, 25, 4, 29, 23, 12, 10, 26, 17, 25]
var onBarchartClick = function(d) {
console.log(d)
}
return (
<div>
<BarchartEnvelope data={data} onBarchartClick={onBarchartClick} hoverEffect={true}/>
</div>
)
}
})
React.render(<Graph />, document.body)Options
onBarchartClick={onBarchartClick}barchart click event listenerhoverEffect={true}settrueto have hover effect on the charttooltip={true}settrueto add tooltip to the chartwidthset the width of the chartheightset the height of the chartstrokeColorset the color of the strokestrokeWidthset the width of the stroke
License
MIT
