@carbon/charts-react 0.30.21 → 0.30.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/bundle.js +1 -1
- package/index.js +2 -1
- package/package.json +2 -2
- package/radar-chart.js +47 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.30.25](https://github.com/IBM/carbon-charts/compare/v0.30.24...v0.30.25) (2020-05-21)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts-react
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.30.24](https://github.com/IBM/carbon-charts/compare/v0.30.23...v0.30.24) (2020-05-15)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @carbon/charts-react
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.30.23](https://github.com/IBM/carbon-charts/compare/v0.30.22...v0.30.23) (2020-05-13)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @carbon/charts-react
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [0.30.22](https://github.com/IBM/carbon-charts/compare/v0.30.21...v0.30.22) (2020-05-13)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @carbon/charts-react
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
## [0.30.21](https://github.com/IBM/carbon-charts/compare/v0.30.20...v0.30.21) (2020-05-11)
|
|
7
39
|
|
|
8
40
|
**Note:** Version bump only for package @carbon/charts-react
|
package/bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("@carbon/charts")):"function"==typeof define&&define.amd?define(["exports","react","@carbon/charts"],e):e((t=t||self).ChartsReact={},t.React,t.Charts)}(this,(function(t,e,n){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var o=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),r=t.options,o=t.data;return r||console.error("Missing options!"),o||console.error("Missing data!"),n.data=t.data||{},n.options=t.options||{},Object.assign(n,n.chart),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"componentDidUpdate",value:function(){this.chart.model.setData(this.props.data),this.chart.model.setOptions(this.props.options)}}]),e}(e.Component),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function r(){return a(this,r),c(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),i(r,[{key:"componentDidMount",value:function(){this.chart=new n.GroupedBarChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),f=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var l=function(t){function r(){return p(this,r),s(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),f(r,[{key:"componentDidMount",value:function(){this.chart=new n.SimpleBarChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),h=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var d=function(t){function r(){return y(this,r),b(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),h(r,[{key:"componentDidMount",value:function(){this.chart=new n.StackedBarChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function w(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var _=function(t){function r(){return w(this,r),O(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),v(r,[{key:"componentDidMount",value:function(){this.chart=new n.BubbleChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),m=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function j(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var g=function(t){function r(){return j(this,r),P(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),m(r,[{key:"componentDidMount",value:function(){this.chart=new n.DonutChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),E=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function k(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var R=function(t){function r(){return k(this,r),C(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),E(r,[{key:"componentDidMount",value:function(){this.chart=new n.LineChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),T=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var D=function(t){function r(){return S(this,r),x(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),T(r,[{key:"componentDidMount",value:function(){this.chart=new n.PieChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),M=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var q=function(t){function r(){return B(this,r),N(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),M(r,[{key:"componentDidMount",value:function(){this.chart=new n.ScatterChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o);t.BubbleChart=_,t.DonutChart=g,t.GroupedBarChart=u,t.LineChart=R,t.PieChart=D,t.ScatterChart=q,t.SimpleBarChart=l,t.StackedBarChart=d,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("@carbon/charts")):"function"==typeof define&&define.amd?define(["exports","react","@carbon/charts"],e):e((t=t||self).ChartsReact={},t.React,t.Charts)}(this,(function(t,e,n){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var o=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),r=t.options,o=t.data;return r||console.error("Missing options!"),o||console.error("Missing data!"),n.data=t.data||{},n.options=t.options||{},Object.assign(n,n.chart),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"componentDidUpdate",value:function(){this.chart.model.setData(this.props.data),this.chart.model.setOptions(this.props.options)}}]),e}(e.Component),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function r(){return a(this,r),c(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),i(r,[{key:"componentDidMount",value:function(){this.chart=new n.GroupedBarChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),f=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var l=function(t){function r(){return p(this,r),s(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),f(r,[{key:"componentDidMount",value:function(){this.chart=new n.SimpleBarChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),h=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var d=function(t){function r(){return y(this,r),b(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),h(r,[{key:"componentDidMount",value:function(){this.chart=new n.StackedBarChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function w(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var _=function(t){function r(){return w(this,r),O(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),v(r,[{key:"componentDidMount",value:function(){this.chart=new n.BubbleChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),m=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function j(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var g=function(t){function r(){return j(this,r),P(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),m(r,[{key:"componentDidMount",value:function(){this.chart=new n.DonutChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),E=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function R(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var C=function(t){function r(){return R(this,r),k(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),E(r,[{key:"componentDidMount",value:function(){this.chart=new n.LineChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),T=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var D=function(t){function r(){return S(this,r),x(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),T(r,[{key:"componentDidMount",value:function(){this.chart=new n.PieChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),M=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function N(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var q=function(t){function r(){return N(this,r),B(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),M(r,[{key:"componentDidMount",value:function(){this.chart=new n.ScatterChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o),G=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function L(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var z=function(t){function r(){return L(this,r),U(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),G(r,[{key:"componentDidMount",value:function(){this.chart=new n.RadarChart(this.chartRef,{data:this.props.data,options:this.props.options})}},{key:"render",value:function(){var t=this;return e.createElement("div",{ref:function(e){return t.chartRef=e},className:"chart-holder"})}}]),r}(o);t.BubbleChart=_,t.DonutChart=g,t.GroupedBarChart=u,t.LineChart=C,t.PieChart=D,t.RadarChart=z,t.ScatterChart=q,t.SimpleBarChart=l,t.StackedBarChart=d,Object.defineProperty(t,"__esModule",{value:!0})}));
|
package/index.js
CHANGED
|
@@ -6,5 +6,6 @@ import DonutChart from "./donut-chart";
|
|
|
6
6
|
import LineChart from "./line-chart";
|
|
7
7
|
import PieChart from "./pie-chart";
|
|
8
8
|
import ScatterChart from "./scatter-chart";
|
|
9
|
+
import RadarChart from "./radar-chart";
|
|
9
10
|
|
|
10
|
-
export { GroupedBarChart, SimpleBarChart, StackedBarChart, BubbleChart, DonutChart, LineChart, PieChart, ScatterChart };
|
|
11
|
+
export { GroupedBarChart, SimpleBarChart, StackedBarChart, BubbleChart, DonutChart, LineChart, PieChart, ScatterChart, RadarChart };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/charts-react",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.25",
|
|
4
4
|
"description": "Carbon charting components for React",
|
|
5
5
|
"main": "./bundle.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://github.com/IBM/carbon-charts#readme",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@carbon/charts": "^0.30.
|
|
48
|
+
"@carbon/charts": "^0.30.25"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react": "^16.6.3",
|
package/radar-chart.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
2
|
+
|
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
+
|
|
5
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
6
|
+
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
8
|
+
|
|
9
|
+
import React from "react";
|
|
10
|
+
|
|
11
|
+
import { RadarChart as RC } from "@carbon/charts";
|
|
12
|
+
import BaseChart from "./base-chart";
|
|
13
|
+
|
|
14
|
+
var RadarChart = function (_BaseChart) {
|
|
15
|
+
_inherits(RadarChart, _BaseChart);
|
|
16
|
+
|
|
17
|
+
function RadarChart() {
|
|
18
|
+
_classCallCheck(this, RadarChart);
|
|
19
|
+
|
|
20
|
+
return _possibleConstructorReturn(this, (RadarChart.__proto__ || Object.getPrototypeOf(RadarChart)).apply(this, arguments));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
_createClass(RadarChart, [{
|
|
24
|
+
key: "componentDidMount",
|
|
25
|
+
value: function componentDidMount() {
|
|
26
|
+
this.chart = new RC(this.chartRef, {
|
|
27
|
+
data: this.props.data,
|
|
28
|
+
options: this.props.options
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
key: "render",
|
|
33
|
+
value: function render() {
|
|
34
|
+
var _this2 = this;
|
|
35
|
+
|
|
36
|
+
return React.createElement("div", {
|
|
37
|
+
ref: function ref(chartRef) {
|
|
38
|
+
return _this2.chartRef = chartRef;
|
|
39
|
+
},
|
|
40
|
+
className: "chart-holder" });
|
|
41
|
+
}
|
|
42
|
+
}]);
|
|
43
|
+
|
|
44
|
+
return RadarChart;
|
|
45
|
+
}(BaseChart);
|
|
46
|
+
|
|
47
|
+
export default RadarChart;
|