react-highcharts-v5
React.js(v16.x+) component wrap for HighCharts.js(v6.x+)
Installation
$ npm install --save highcharts react-highcharts-v5
Usage
-
Change webpack config
For webpack 1.x:
{test: /\.jsx?$/,loader: 'babel',include: [- path.join(prjRoot, 'src')+ path.join(prjRoot, 'src'),+ path.join(prjRoot, 'node_modules/react-highcharts-v5/src')],- exclude: /node_modules/+ exclude: /node_modules(?![\\/]react-highcharts-v5[\\/]src[\\/])/},For webpack 2.x+:
{test: /\.jsx?$/,loader: 'babel-loader',- include: [resolve('src'), resolve('test')]+ include: [resolve('src'), resolve('test'), resolve('node_modules/react-highcharts-v5/src')]} -
Import HighCharts
;{const options = {};return<IHighChartsoptions=options/>;}; -
Import HighMaps
;{const options = {};return<IHighChartsoptions=options/>;}; -
Import HighStock
;{const options = {};return<IHighChartsoptions=options/>;};
propTypes
className: PropTypesstringstyle: PropTypesobjectloading: PropTypestheme: PropTypesobjectresizable: PropTypesbooloptions: PropTypesobjectisRequiredonLoad: PropTypesfunconResize: PropTypesfunc
defaultProps
className: 'react-highcharts'style: width: '100%' height: '100%'loading: falsetheme: nullresizable: false {} {}
Demo
License
MIT