Socket
Socket
Sign inDemoInstall

react-highcharts

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-highcharts - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "react-highcharts",
"version": "1.0.2",
"version": "1.0.3",
"description": "React wrapper for highcharts",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -19,3 +19,2 @@ react-highcharts

```jsx
var React = require('react');

@@ -28,3 +27,2 @@ var Highcharts = require('react-highcharts');

React.render(<Highcharts config = {config}></Highcharts>, document.body);
```

@@ -34,3 +32,18 @@

Highcharts provides an API for manipulating a chart after the initial render. See the **Methods and Properties** in [the documentation](http://api.highcharts.com/highcharts). Here's how you access it:
```jsx
class MyComponent extends React.Component {
componentDidMount() {
let chart = this.refs.chart.getChart();
chart.series.addPoint({x: 10, y: 12});
}
render() {
return <Highcharts config={config} ref="chart"></Highcharts>;
}
}
```
## Using highcharts-more
Just require `require('react-highcharts/more');` instead of `react-highcharts`

@@ -22,5 +22,12 @@ global.HighchartsAdapter = require('exports?HighchartsAdapter!Highcharts/js/adapters/standalone-framework.src');

new Highcharts.Chart(config);
this.chart = new Highcharts.Chart(config);
},
getChart: function() {
if (!this.chart) {
throw new Error('getChart() should not be called before the component is mounted');
}
return this.chart;
},
componentDidMount: function () {

@@ -27,0 +34,0 @@ this.renderChart();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc