text: var example=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=190)}({0:function(e,t){e.exports=React},1:function(e,t){e.exports=ReactHighcharts},10:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}var a=n(2);function i(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?Object(a.a)(e):t}n.d(t,"a",function(){return i})},11:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",function(){return o})},12:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),i=(r=a)&&r.__esModule?r:{default:r},s=n(13);function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=c(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r._handleRefMount=function(e){r._domNode=e},c(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.PureComponent),o(t,[{key:"componentDidMount",value:function(){this._hightlight()}},{key:"componentDidUpdate",value:function(){this._hightlight()}},{key:"_hightlight",value:function(){Prism.highlightElement(this._domNode,this.props.async)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.component,r=e.children;return i.default.createElement(n,{ref:this._handleRefMount,className:t},r)}}]),t}();u.propTypes={async:s.PropTypes.bool,className:s.PropTypes.string,children:s.PropTypes.any,component:s.PropTypes.node},u.defaultProps={component:"code"},t.default=u},13:function(e,t,n){e.exports=n(14)()},14:function(e,t,n){"use strict";var r=n(15);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},15:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},18:function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"c",function(){return o}),n.d(t,"a",function(){return a});var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return[e+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)*t,Math.round(100*Math.random()*2)/2]},o=function(e,t){for(var n=[],o=-1*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:100)+1;o<=0;o++)n.push(r(e,t,o));return n},a=function(e,t){t||(t=r());var n=e.slice(0);return n.push(t),n}},190:function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(4),i=n.n(a),s=n(7),c=n(8),u=n(10),l=n(9),f=n(11),d=n(2),p=n(3),m=n.n(p),h=n(1),b=n(5),y=n(18),v=function(e){function t(e){var n;Object(s.a)(this,t),(n=Object(u.a)(this,Object(l.a)(t).call(this,e))).createRandomSeries=n.createRandomSeries.bind(Object(d.a)(Object(d.a)(n))),n.handleAddSeries=n.handleAddSeries.bind(Object(d.a)(Object(d.a)(n))),n.handleRemoveSeries=n.handleRemoveSeries.bind(Object(d.a)(Object(d.a)(n))),n.renderSeries=n.renderSeries.bind(Object(d.a)(Object(d.a)(n)));var r=Date.now();return n.state={now:r,series:[{name:"Profit",data:Object(y.c)(r,1e8)}],seriesCounter:1},n}return Object(f.a)(t,e),Object(c.a)(t,[{key:"createRandomSeries",value:function(e){return{name:"Series".concat(e),data:Object(y.c)(this.state.now,1e8)}}},{key:"handleAddSeries",value:function(e){e.preventDefault();var t=this.state,n=t.series,r=t.seriesCounter;r++,n.push(this.createRandomSeries(r)),this.setState({series:n,seriesCounter:r})}},{key:"handleRemoveSeries",value:function(e){e.preventDefault();var t=this.state.series,n=Math.floor(Math.random()*t.length);t.splice(n,1),this.setState({series:t})}},{key:"renderSeries",value:function(e){var t=e.name,n=e.data;return o.a.createElement(h.LineSeries,{name:t,key:t,data:n})}},{key:"render",value:function(){return o.a.createElement("div",{className:"app"},o.a.createElement(h.HighchartsChart,null,o.a.createElement(h.Title,null,"Dynamically add/remove series"),o.a.createElement(h.Legend,{align:"left"},o.a.createElement(h.Legend.Title,null,"Legend")),o.a.createElement(h.XAxis,{type:"datetime"},o.a.createElement(h.XAxis.Title,null,"Time")),o.a.createElement(h.YAxis,null,o.a.createElement(h.YAxis.Title,null,"Price"),this.state.series.map(this.renderSeries))),o.a.createElement("div",{className:"btn-toolbar",role:"toolbar"},o.a.createElement("button",{className:"btn btn-primary",onClick:this.handleAddSeries},"Add line series"),o.a.createElement("button",{className:"btn btn-danger",onClick:this.handleRemoveSeries},"Remove line series")),o.a.createElement(b.a,{name:"AddSeries"},'\ncreateRandomSeries (index) {\n  return {\n    name: `Series${index}`,\n    data: createRandomData(this.state.now, 1e8)\n  };\n}\n\nhandleAddSeries (e) {\n  e.preventDefault();\n  let { series, seriesCounter } = this.state;\n  seriesCounter++;\n  series.push(\n    this.createRandomSeries(seriesCounter)\n  );\n\n  this.setState({\n    series,\n    seriesCounter\n  });\n}\n\nhandleRemoveSeries (e) {\n  e.preventDefault();\n  const { series } = this.state;\n  const randomIndex = Math.floor(Math.random() * series.length);\n  series.splice(randomIndex, 1);\n\n  this.setState({\n    series\n  });\n}\n\nrenderSeries ({ name, data }) {\n  return (\n    <LineSeries name={name} key={name} data={data} />\n  );\n}\n\nrender() {\n  return (\n    <div className="app">\n\n      <HighchartsChart>\n        <Title>Dynamically add/remove series</Title>\n\n        <Legend align="left">\n          <Legend.Title>Legend</Legend.Title>\n        </Legend>\n\n        <XAxis type="datetime">\n          <XAxis.Title>Time</XAxis.Title>\n        </XAxis>\n\n        <YAxis>\n          <YAxis.Title>Price</YAxis.Title>\n          {this.state.series.map(this.renderSeries)}\n        </YAxis>\n      </HighchartsChart>\n\n      <div className="btn-toolbar" role="toolbar">\n        <button className="btn btn-primary" onClick={this.handleAddSeries}>Add line series</button>\n        <button className="btn btn-danger" onClick={this.handleRemoveSeries}>Remove line series</button>\n      </div>\n    </div>\n  );\n}\n\n// Remember to inject Highcharts to exported component\nexport default withHighcharts(MyComponent, Highcharts);'))}}]),t}(r.Component),g=Object(h.withHighcharts)(v,m.a);i.a.render(o.a.createElement(g,null),document.getElementById("root"))},2:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return r})},3:function(e,t){e.exports=Highcharts},4:function(e,t){e.exports=ReactDOM},5:function(e,t,n){"use strict";var r=n(6);t.a=function(e){var t=e.name,n=e.children;return React.createElement("div",null,React.createElement("pre",null,React.createElement(r.PrismCode,{className:"language-jsx"},n)),React.createElement("a",{href:"https://github.com/whawker/react-jsx-highcharts/blob/gh-pages/examples/".concat(t,"/App.js"),className:"btn btn-link"},"See full example code"))}},6:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12);function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"PrismCode",{enumerable:!0,get:function(){return o(r).default}}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o(r).default}})},7:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},8:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",function(){return o})},9:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",function(){return r})}});