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 9.0.0 to 10.0.0

.github/ISSUE_TEMPLATE.md

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # React-highcharts Change Log

## [10.0.0] - 2016-07-06
Introduce new `domProps` property to explicitly specifying DOM properties.
## [9.0.0] - 2016-07-06
Get rid of custom property warnings in react 15.2
## [6.0.0] - 2015-11-26

@@ -8,0 +14,0 @@ ### Changed

2

dist/index.js

@@ -1,1 +0,1 @@

!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("highcharts")):"function"==typeof define&&define.amd?define(["react","highcharts"],r):"object"==typeof exports?exports.index=r(require("react"),require("highcharts")):e.index=r(e.React,e.Highcharts)}(this,function(e,r){return function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}([function(e,r,t){e.exports=t(3)},function(r,t){r.exports=e},function(e,r,t){(function(r){"use strict";function n(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}var o=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},i=t(1),c="undefined"==typeof r?window:r;e.exports=function(r,t){var s="Highcharts"+r,a=i.createClass({displayName:s,propTypes:{config:i.PropTypes.object.isRequired,isPureConfig:i.PropTypes.bool,neverReflow:i.PropTypes.bool,callback:i.PropTypes.func},defaultProps:{callback:function(){}},renderChart:function(e){var n=this;if(!e)throw new Error("Config must be specified for the "+s+" component");var i=e.chart;this.chart=new t[r](o({},e,{chart:o({},i,{renderTo:this.refs.chart})}),this.props.callback),this.props.neverReflow||c.requestAnimationFrame&&requestAnimationFrame(function(){n.chart&&n.chart.options&&n.chart.reflow()})},shouldComponentUpdate:function(e){return e.neverReflow||e.isPureConfig&&this.props.config===e.config?!0:(this.renderChart(e.config),!1)},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},componentWillUnmount:function(){this.chart.destroy()},render:function(){var e=this.props,r=(e.callback,e.config,e.isPureConfig,e.neverReflow,n(e,["callback","config","isPureConfig","neverReflow"]));return r=o({},r,{ref:"chart"}),i.createElement("div",r)}});return a.Highcharts=t,a.withHighcharts=function(t){return e.exports(r,t)},a}}).call(r,function(){return this}())},function(e,r,t){"use strict";e.exports=t(2)("Chart",t(4))},function(e,t){e.exports=r}])});
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("highcharts")):"function"==typeof define&&define.amd?define(["react","highcharts"],r):"object"==typeof exports?exports.index=r(require("react"),require("highcharts")):t.index=r(t.React,t.Highcharts)}(this,function(t,r){return function(t){function r(o){if(e[o])return e[o].exports;var n=e[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}var e={};return r.m=t,r.c=e,r.p="",r(0)}([function(t,r,e){t.exports=e(3)},function(r,e){r.exports=t},function(t,r,e){(function(r){"use strict";var o=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},n=e(1),i="undefined"==typeof r?window:r;t.exports=function(r,e){var c="Highcharts"+r,s=n.createClass({displayName:c,propTypes:{config:n.PropTypes.object.isRequired,isPureConfig:n.PropTypes.bool,neverReflow:n.PropTypes.bool,callback:n.PropTypes.func,domProps:n.PropTypes.object},defaultProps:{callback:function(){},domProps:{}},renderChart:function(t){var n=this;if(!t)throw new Error("Config must be specified for the "+c+" component");var s=t.chart;this.chart=new e[r](o({},t,{chart:o({},s,{renderTo:this.refs.chart})}),this.props.callback),this.props.neverReflow||i.requestAnimationFrame&&requestAnimationFrame(function(){n.chart&&n.chart.options&&n.chart.reflow()})},shouldComponentUpdate:function(t){return t.neverReflow||t.isPureConfig&&this.props.config===t.config?!0:(this.renderChart(t.config),!1)},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},componentWillUnmount:function(){this.chart.destroy()},render:function(){return n.createElement("div",o({ref:"chart"},this.props.domProps))}});return s.Highcharts=e,s.withHighcharts=function(e){return t.exports(r,e)},s}}).call(r,function(){return this}())},function(t,r,e){"use strict";t.exports=e(2)("Chart",e(4))},function(t,e){t.exports=r}])});

@@ -76,4 +76,2 @@ (function webpackUniversalModuleDefinition(root, factory) {

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var React = __webpack_require__(3);

@@ -91,7 +89,9 @@ var win = typeof global === 'undefined' ? window : global;

neverReflow: React.PropTypes.bool,
callback: React.PropTypes.func
callback: React.PropTypes.func,
domProps: React.PropTypes.object
},
defaultProps: {
callback: function callback() {}
callback: function callback() {},
domProps: {}
},

@@ -145,18 +145,3 @@

render: function render() {
/*
stripping out the internal props and creating new props
so that only valid (user-driven) props are passed to the div
*/
var _props = this.props;
var callback = _props.callback;
var config = _props.config;
var isPureConfig = _props.isPureConfig;
var neverReflow = _props.neverReflow;
var props = _objectWithoutProperties(_props, ['callback', 'config', 'isPureConfig', 'neverReflow']);
props = _extends({}, props, {
ref: 'chart'
});
return React.createElement('div', props);
return React.createElement('div', _extends({ ref: 'chart' }, this.props.domProps));
}

@@ -163,0 +148,0 @@ });

@@ -1,1 +0,1 @@

!function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("highcharts")):"function"==typeof define&&define.amd?define(["react","highcharts"],t):"object"==typeof exports?exports.ReactHighcharts=t(require("react"),require("highcharts")):r.ReactHighcharts=t(r.React,r.Highcharts)}(this,function(r,t){return function(r){function t(o){if(e[o])return e[o].exports;var n=e[o]={exports:{},id:o,loaded:!1};return r[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var e={};return t.m=r,t.c=e,t.p="",t(0)}([function(r,t,e){r.exports=e(3)},function(t,e){t.exports=r},function(r,t,e){(function(t){"use strict";function o(r,t){var e={};for(var o in r)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}var n=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}return r},i=e(1),c="undefined"==typeof t?window:t;r.exports=function(t,e){var a="Highcharts"+t,s=i.createClass({displayName:a,propTypes:{config:i.PropTypes.object.isRequired,isPureConfig:i.PropTypes.bool,neverReflow:i.PropTypes.bool,callback:i.PropTypes.func},defaultProps:{callback:function(){}},renderChart:function(r){var o=this;if(!r)throw new Error("Config must be specified for the "+a+" component");var i=r.chart;this.chart=new e[t](n({},r,{chart:n({},i,{renderTo:this.refs.chart})}),this.props.callback),this.props.neverReflow||c.requestAnimationFrame&&requestAnimationFrame(function(){o.chart&&o.chart.options&&o.chart.reflow()})},shouldComponentUpdate:function(r){return r.neverReflow||r.isPureConfig&&this.props.config===r.config?!0:(this.renderChart(r.config),!1)},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},componentWillUnmount:function(){this.chart.destroy()},render:function(){var r=this.props,t=(r.callback,r.config,r.isPureConfig,r.neverReflow,o(r,["callback","config","isPureConfig","neverReflow"]));return t=n({},t,{ref:"chart"}),i.createElement("div",t)}});return s.Highcharts=e,s.withHighcharts=function(e){return r.exports(t,e)},s}}).call(t,function(){return this}())},function(r,t,e){"use strict";r.exports=e(2)("Chart",e(4))},function(r,e){r.exports=t}])});
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("highcharts")):"function"==typeof define&&define.amd?define(["react","highcharts"],r):"object"==typeof exports?exports.ReactHighcharts=r(require("react"),require("highcharts")):t.ReactHighcharts=r(t.React,t.Highcharts)}(this,function(t,r){return function(t){function r(o){if(e[o])return e[o].exports;var n=e[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}var e={};return r.m=t,r.c=e,r.p="",r(0)}([function(t,r,e){t.exports=e(3)},function(r,e){r.exports=t},function(t,r,e){(function(r){"use strict";var o=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},n=e(1),i="undefined"==typeof r?window:r;t.exports=function(r,e){var c="Highcharts"+r,s=n.createClass({displayName:c,propTypes:{config:n.PropTypes.object.isRequired,isPureConfig:n.PropTypes.bool,neverReflow:n.PropTypes.bool,callback:n.PropTypes.func,domProps:n.PropTypes.object},defaultProps:{callback:function(){},domProps:{}},renderChart:function(t){var n=this;if(!t)throw new Error("Config must be specified for the "+c+" component");var s=t.chart;this.chart=new e[r](o({},t,{chart:o({},s,{renderTo:this.refs.chart})}),this.props.callback),this.props.neverReflow||i.requestAnimationFrame&&requestAnimationFrame(function(){n.chart&&n.chart.options&&n.chart.reflow()})},shouldComponentUpdate:function(t){return t.neverReflow||t.isPureConfig&&this.props.config===t.config?!0:(this.renderChart(t.config),!1)},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},componentWillUnmount:function(){this.chart.destroy()},render:function(){return n.createElement("div",o({ref:"chart"},this.props.domProps))}});return s.Highcharts=e,s.withHighcharts=function(e){return t.exports(r,e)},s}}).call(r,function(){return this}())},function(t,r,e){"use strict";t.exports=e(2)("Chart",e(4))},function(t,e){t.exports=r}])});

@@ -76,4 +76,2 @@ (function webpackUniversalModuleDefinition(root, factory) {

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var React = __webpack_require__(3);

@@ -91,7 +89,9 @@ var win = typeof global === 'undefined' ? window : global;

neverReflow: React.PropTypes.bool,
callback: React.PropTypes.func
callback: React.PropTypes.func,
domProps: React.PropTypes.object
},
defaultProps: {
callback: function callback() {}
callback: function callback() {},
domProps: {}
},

@@ -145,18 +145,3 @@

render: function render() {
/*
stripping out the internal props and creating new props
so that only valid (user-driven) props are passed to the div
*/
var _props = this.props;
var callback = _props.callback;
var config = _props.config;
var isPureConfig = _props.isPureConfig;
var neverReflow = _props.neverReflow;
var props = _objectWithoutProperties(_props, ['callback', 'config', 'isPureConfig', 'neverReflow']);
props = _extends({}, props, {
ref: 'chart'
});
return React.createElement('div', props);
return React.createElement('div', _extends({ ref: 'chart' }, this.props.domProps));
}

@@ -163,0 +148,0 @@ });

@@ -1,1 +0,1 @@

!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("highcharts/highmaps")):"function"==typeof define&&define.amd?define(["react","highcharts/highmaps"],r):"object"==typeof exports?exports.ReactHighmaps=r(require("react"),require("highcharts/highmaps")):e.ReactHighmaps=r(e.React,e.Highcharts)}(this,function(e,r){return function(e){function r(o){if(t[o])return t[o].exports;var n=t[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}([function(e,r,t){e.exports=t(5)},function(r,t){r.exports=e},function(e,r,t){(function(r){"use strict";function o(e,r){var t={};for(var o in e)r.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}var n=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},i=t(1),c="undefined"==typeof r?window:r;e.exports=function(r,t){var a="Highcharts"+r,s=i.createClass({displayName:a,propTypes:{config:i.PropTypes.object.isRequired,isPureConfig:i.PropTypes.bool,neverReflow:i.PropTypes.bool,callback:i.PropTypes.func},defaultProps:{callback:function(){}},renderChart:function(e){var o=this;if(!e)throw new Error("Config must be specified for the "+a+" component");var i=e.chart;this.chart=new t[r](n({},e,{chart:n({},i,{renderTo:this.refs.chart})}),this.props.callback),this.props.neverReflow||c.requestAnimationFrame&&requestAnimationFrame(function(){o.chart&&o.chart.options&&o.chart.reflow()})},shouldComponentUpdate:function(e){return e.neverReflow||e.isPureConfig&&this.props.config===e.config?!0:(this.renderChart(e.config),!1)},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},componentWillUnmount:function(){this.chart.destroy()},render:function(){var e=this.props,r=(e.callback,e.config,e.isPureConfig,e.neverReflow,o(e,["callback","config","isPureConfig","neverReflow"]));return r=n({},r,{ref:"chart"}),i.createElement("div",r)}});return s.Highcharts=t,s.withHighcharts=function(t){return e.exports(r,t)},s}}).call(r,function(){return this}())},,,function(e,r,t){"use strict";e.exports=t(2)("Map",t(8))},,,function(e,t){e.exports=r}])});
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("highcharts/highmaps")):"function"==typeof define&&define.amd?define(["react","highcharts/highmaps"],r):"object"==typeof exports?exports.ReactHighmaps=r(require("react"),require("highcharts/highmaps")):t.ReactHighmaps=r(t.React,t.Highcharts)}(this,function(t,r){return function(t){function r(o){if(e[o])return e[o].exports;var n=e[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}var e={};return r.m=t,r.c=e,r.p="",r(0)}([function(t,r,e){t.exports=e(5)},function(r,e){r.exports=t},function(t,r,e){(function(r){"use strict";var o=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},n=e(1),i="undefined"==typeof r?window:r;t.exports=function(r,e){var s="Highcharts"+r,c=n.createClass({displayName:s,propTypes:{config:n.PropTypes.object.isRequired,isPureConfig:n.PropTypes.bool,neverReflow:n.PropTypes.bool,callback:n.PropTypes.func,domProps:n.PropTypes.object},defaultProps:{callback:function(){},domProps:{}},renderChart:function(t){var n=this;if(!t)throw new Error("Config must be specified for the "+s+" component");var c=t.chart;this.chart=new e[r](o({},t,{chart:o({},c,{renderTo:this.refs.chart})}),this.props.callback),this.props.neverReflow||i.requestAnimationFrame&&requestAnimationFrame(function(){n.chart&&n.chart.options&&n.chart.reflow()})},shouldComponentUpdate:function(t){return t.neverReflow||t.isPureConfig&&this.props.config===t.config?!0:(this.renderChart(t.config),!1)},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},componentWillUnmount:function(){this.chart.destroy()},render:function(){return n.createElement("div",o({ref:"chart"},this.props.domProps))}});return c.Highcharts=e,c.withHighcharts=function(e){return t.exports(r,e)},c}}).call(r,function(){return this}())},,,function(t,r,e){"use strict";t.exports=e(2)("Map",e(8))},,,function(t,e){t.exports=r}])});

@@ -69,4 +69,2 @@ (function webpackUniversalModuleDefinition(root, factory) {

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var React = __webpack_require__(3);

@@ -84,7 +82,9 @@ var win = typeof global === 'undefined' ? window : global;

neverReflow: React.PropTypes.bool,
callback: React.PropTypes.func
callback: React.PropTypes.func,
domProps: React.PropTypes.object
},
defaultProps: {
callback: function callback() {}
callback: function callback() {},
domProps: {}
},

@@ -138,18 +138,3 @@

render: function render() {
/*
stripping out the internal props and creating new props
so that only valid (user-driven) props are passed to the div
*/
var _props = this.props;
var callback = _props.callback;
var config = _props.config;
var isPureConfig = _props.isPureConfig;
var neverReflow = _props.neverReflow;
var props = _objectWithoutProperties(_props, ['callback', 'config', 'isPureConfig', 'neverReflow']);
props = _extends({}, props, {
ref: 'chart'
});
return React.createElement('div', props);
return React.createElement('div', _extends({ ref: 'chart' }, this.props.domProps));
}

@@ -156,0 +141,0 @@ });

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("highcharts/highstock")):"function"==typeof define&&define.amd?define(["react","highcharts/highstock"],e):"object"==typeof exports?exports.ReactHighstock=e(require("react"),require("highcharts/highstock")):t.ReactHighstock=e(t.React,t.Highcharts)}(this,function(t,e){return function(t){function e(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){t.exports=r(6)},function(e,r){e.exports=t},function(t,e,r){(function(e){"use strict";function o(t,e){var r={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},i=r(1),c="undefined"==typeof e?window:e;t.exports=function(e,r){var s="Highcharts"+e,a=i.createClass({displayName:s,propTypes:{config:i.PropTypes.object.isRequired,isPureConfig:i.PropTypes.bool,neverReflow:i.PropTypes.bool,callback:i.PropTypes.func},defaultProps:{callback:function(){}},renderChart:function(t){var o=this;if(!t)throw new Error("Config must be specified for the "+s+" component");var i=t.chart;this.chart=new r[e](n({},t,{chart:n({},i,{renderTo:this.refs.chart})}),this.props.callback),this.props.neverReflow||c.requestAnimationFrame&&requestAnimationFrame(function(){o.chart&&o.chart.options&&o.chart.reflow()})},shouldComponentUpdate:function(t){return t.neverReflow||t.isPureConfig&&this.props.config===t.config?!0:(this.renderChart(t.config),!1)},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},componentWillUnmount:function(){this.chart.destroy()},render:function(){var t=this.props,e=(t.callback,t.config,t.isPureConfig,t.neverReflow,o(t,["callback","config","isPureConfig","neverReflow"]));return e=n({},e,{ref:"chart"}),i.createElement("div",e)}});return a.Highcharts=r,a.withHighcharts=function(r){return t.exports(e,r)},a}}).call(e,function(){return this}())},,,,function(t,e,r){"use strict";t.exports=r(2)("StockChart",r(9))},,,function(t,r){t.exports=e}])});
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("highcharts/highstock")):"function"==typeof define&&define.amd?define(["react","highcharts/highstock"],r):"object"==typeof exports?exports.ReactHighstock=r(require("react"),require("highcharts/highstock")):t.ReactHighstock=r(t.React,t.Highcharts)}(this,function(t,r){return function(t){function r(o){if(e[o])return e[o].exports;var n=e[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}var e={};return r.m=t,r.c=e,r.p="",r(0)}([function(t,r,e){t.exports=e(6)},function(r,e){r.exports=t},function(t,r,e){(function(r){"use strict";var o=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},n=e(1),i="undefined"==typeof r?window:r;t.exports=function(r,e){var c="Highcharts"+r,s=n.createClass({displayName:c,propTypes:{config:n.PropTypes.object.isRequired,isPureConfig:n.PropTypes.bool,neverReflow:n.PropTypes.bool,callback:n.PropTypes.func,domProps:n.PropTypes.object},defaultProps:{callback:function(){},domProps:{}},renderChart:function(t){var n=this;if(!t)throw new Error("Config must be specified for the "+c+" component");var s=t.chart;this.chart=new e[r](o({},t,{chart:o({},s,{renderTo:this.refs.chart})}),this.props.callback),this.props.neverReflow||i.requestAnimationFrame&&requestAnimationFrame(function(){n.chart&&n.chart.options&&n.chart.reflow()})},shouldComponentUpdate:function(t){return t.neverReflow||t.isPureConfig&&this.props.config===t.config?!0:(this.renderChart(t.config),!1)},getChart:function(){if(!this.chart)throw new Error("getChart() should not be called before the component is mounted");return this.chart},componentDidMount:function(){this.renderChart(this.props.config)},componentWillUnmount:function(){this.chart.destroy()},render:function(){return n.createElement("div",o({ref:"chart"},this.props.domProps))}});return s.Highcharts=e,s.withHighcharts=function(e){return t.exports(r,e)},s}}).call(r,function(){return this}())},,,,function(t,r,e){"use strict";t.exports=e(2)("StockChart",e(9))},,,function(t,e){t.exports=r}])});

@@ -69,4 +69,2 @@ (function webpackUniversalModuleDefinition(root, factory) {

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var React = __webpack_require__(3);

@@ -84,7 +82,9 @@ var win = typeof global === 'undefined' ? window : global;

neverReflow: React.PropTypes.bool,
callback: React.PropTypes.func
callback: React.PropTypes.func,
domProps: React.PropTypes.object
},
defaultProps: {
callback: function callback() {}
callback: function callback() {},
domProps: {}
},

@@ -138,18 +138,3 @@

render: function render() {
/*
stripping out the internal props and creating new props
so that only valid (user-driven) props are passed to the div
*/
var _props = this.props;
var callback = _props.callback;
var config = _props.config;
var isPureConfig = _props.isPureConfig;
var neverReflow = _props.neverReflow;
var props = _objectWithoutProperties(_props, ['callback', 'config', 'isPureConfig', 'neverReflow']);
props = _extends({}, props, {
ref: 'chart'
});
return React.createElement('div', props);
return React.createElement('div', _extends({ ref: 'chart' }, this.props.domProps));
}

@@ -156,0 +141,0 @@ });

{
"name": "react-highcharts",
"version": "9.0.0",
"version": "10.0.0",
"description": "React wrapper for highcharts",
"main": "dist/ReactHighcharts.js",
"scripts": {
"test": "webpack && mocha",
"test": "webpack && mocha test/unit",
"e2e": "nightwatch test/e2e/e2e-launcher.js -e local --config nightwatch.js ",
"e2e-sc": "nightwatch test/e2e/e2e-launcher.js -e saucelabs --config nightwatch.js ",
"build": "webpack && webpack -p && webpack -b && webpack -p -b",

@@ -42,3 +44,3 @@ "demo": "cd demo && webpack && sh generate-contents.sh && ../node_modules/.bin/webpack-dev-server --content-base dist/",

"exports-loader": "^0.6.2",
"file-loader": "^0.8.4",
"file-loader": "^0.9.0",
"highlight.js": "^9.3.0",

@@ -49,2 +51,3 @@ "imports-loader": "^0.6.4",

"mock-require": "^1.3.0",
"nightwatch": "^0.9.6",
"raw-loader": "^0.5.1",

@@ -51,0 +54,0 @@ "react": "^15.0.0",

@@ -41,8 +41,15 @@ react-highcharts

ReactDOM.render(<ReactHighcharts config = {config}></ReactHighcharts>, document.body);
```
/* with optional after-render callback */
const afterRender = () => { /* do stuff */ };
ReactDOM.render(<ReactHighcharts config = {config} callback = {afterRender}></ReactHighcharts>, document.body);
#### Optional after-render callback
```jsx
const afterRender = (chart) => { /* do stuff with the chart */ };
<ReactHighcharts config = {config} callback = {afterRender}></ReactHighcharts>
```
#### Passing properties to the wrapping DOM element
```jsx
<ReactHighcharts config = {config} domProps = {{id: 'chartId'}}></ReactHighcharts>
```
#### Accessing Highcharts API After Render

@@ -69,2 +76,3 @@ For access to methods & properties from the Highcharts library you can use `ReactHighcharts.Highcharts`.

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](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators) to its previous value.
There is also `neverRerender` property.

@@ -71,0 +79,0 @@ #### Rendering on the server with node

@@ -13,7 +13,9 @@ var React = require('react');

neverReflow: React.PropTypes.bool,
callback: React.PropTypes.func
callback: React.PropTypes.func,
domProps: React.PropTypes.object
},
defaultProps: {
callback: () =>{}
callback: () =>{},
domProps: {}
},

@@ -65,18 +67,3 @@

render: function (){
/*
stripping out the internal props and creating new props
so that only valid (user-driven) props are passed to the div
*/
let {
callback,
config,
isPureConfig,
neverReflow,
...props
} = this.props;
props = {
...props,
ref: 'chart'
};
return <div {...props} />;
return <div ref="chart" {...this.props.domProps} />;
}

@@ -83,0 +70,0 @@ });

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

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

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

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

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

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

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

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

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

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

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

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

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

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