Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
react-highcharts
Advanced tools
Highcharts component for react.
react-highcharts | react-highcharts/more | react-highcharts/highstock | react-highcharts/highmaps
You can find the full code for the examples here
To run the demo:
git clone https://github.com/kirjs/react-highcharts.git
npm install
npm run demo
npm install react-highcharts --save
npm install react-highcharts highcharts react --save
var React = require('react');
var Highcharts = require('highcharts');
var ReactHighcharts = require('react-highcharts')(Highcharts); // Expects that Highcharts was loaded in the code.
var config = {
/* HighchartsConfig */
};
React.render(<ReactHighcharts config = {config}></ReactHighcharts>, document.body);
For access to methods & properties from the Highcharts library you can use ReactHighcharts.Highcharts
.
For example, the Highcharts options are available via ReactHighcharts.Highcharts.getOptions()
.
Highcharts provides an API for manipulating a chart after the initial render. See the Methods and Properties in the documentation. Here's how you access it:
class MyComponent extends React.Component {
componentDidMount() {
let chart = this.refs.chart.getChart();
chart.series[0].addPoint({x: 10, y: 12});
}
render() {
return <ReactHighcharts config={config} ref="chart"></ReactHighcharts>;
}
}
Rerendering a highcharts graph is expensive. You can pass in a isPureConfig
option to the ReactHighcharts
component, which will keep the highcharts graph from being updated so long as the provided config
is referentially equal to its previous value.
See this recipe
var ReactHighmaps = require('react-highcharts/ReactHighmaps');
var ReactHighstock = require('react-highcharts/ReactHighstock')
Use highcharts-more
npm package.
var ReactHighcharts = require('react-highcharts')
require('highcharts-more')(ReactHighcharts.Highcharts)
You can find the full list list here
Run npm tests
Run npm run demo
npm install react-highcharts@^3.0.0 --save
FAQs
React wrapper for highcharts
The npm package react-highcharts receives a total of 11,294 weekly downloads. As such, react-highcharts popularity was classified as popular.
We found that react-highcharts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.