@carbon/charts-react 0.29.0 → 0.29.1

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 CHANGED
@@ -3,6 +3,14 @@
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.29.1](https://github.com/IBM/carbon-charts/compare/v0.29.0...v0.29.1) (2020-02-10)
7
+
8
+ **Note:** Version bump only for package @carbon/charts-react
9
+
10
+
11
+
12
+
13
+
6
14
  # [0.29.0](https://github.com/IBM/carbon-charts/compare/v0.28.1...v0.29.0) (2020-02-07)
7
15
 
8
16
  **Note:** Version bump only for package @carbon/charts-react
@@ -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 { BubbleChart as BC } from "@carbon/charts";
12
+ import BaseChart from "./base-chart";
13
+
14
+ var BubbleChart = function (_BaseChart) {
15
+ _inherits(BubbleChart, _BaseChart);
16
+
17
+ function BubbleChart() {
18
+ _classCallCheck(this, BubbleChart);
19
+
20
+ return _possibleConstructorReturn(this, (BubbleChart.__proto__ || Object.getPrototypeOf(BubbleChart)).apply(this, arguments));
21
+ }
22
+
23
+ _createClass(BubbleChart, [{
24
+ key: "componentDidMount",
25
+ value: function componentDidMount() {
26
+ this.chart = new BC(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 BubbleChart;
45
+ }(BaseChart);
46
+
47
+ export default BubbleChart;
package/bundle.js CHANGED
@@ -91,18 +91,18 @@ var BaseChart = function (_React$Component) {
91
91
  return BaseChart;
92
92
  }(React.Component);
93
93
 
94
- var PieChart = function (_BaseChart) {
95
- inherits(PieChart, _BaseChart);
94
+ var GroupedBarChart = function (_BaseChart) {
95
+ inherits(GroupedBarChart, _BaseChart);
96
96
 
97
- function PieChart() {
98
- classCallCheck(this, PieChart);
99
- return possibleConstructorReturn(this, (PieChart.__proto__ || Object.getPrototypeOf(PieChart)).apply(this, arguments));
97
+ function GroupedBarChart() {
98
+ classCallCheck(this, GroupedBarChart);
99
+ return possibleConstructorReturn(this, (GroupedBarChart.__proto__ || Object.getPrototypeOf(GroupedBarChart)).apply(this, arguments));
100
100
  }
101
101
 
102
- createClass(PieChart, [{
102
+ createClass(GroupedBarChart, [{
103
103
  key: "componentDidMount",
104
104
  value: function componentDidMount() {
105
- this.chart = new charts.PieChart(this.chartRef, {
105
+ this.chart = new charts.GroupedBarChart(this.chartRef, {
106
106
  data: this.props.data,
107
107
  options: this.props.options
108
108
  });
@@ -119,21 +119,21 @@ var PieChart = function (_BaseChart) {
119
119
  className: "chart-holder" });
120
120
  }
121
121
  }]);
122
- return PieChart;
122
+ return GroupedBarChart;
123
123
  }(BaseChart);
124
124
 
125
- var DonutChart = function (_BaseChart) {
126
- inherits(DonutChart, _BaseChart);
125
+ var SimpleBarChart = function (_BaseChart) {
126
+ inherits(SimpleBarChart, _BaseChart);
127
127
 
128
- function DonutChart() {
129
- classCallCheck(this, DonutChart);
130
- return possibleConstructorReturn(this, (DonutChart.__proto__ || Object.getPrototypeOf(DonutChart)).apply(this, arguments));
128
+ function SimpleBarChart() {
129
+ classCallCheck(this, SimpleBarChart);
130
+ return possibleConstructorReturn(this, (SimpleBarChart.__proto__ || Object.getPrototypeOf(SimpleBarChart)).apply(this, arguments));
131
131
  }
132
132
 
133
- createClass(DonutChart, [{
133
+ createClass(SimpleBarChart, [{
134
134
  key: "componentDidMount",
135
135
  value: function componentDidMount() {
136
- this.chart = new charts.DonutChart(this.chartRef, {
136
+ this.chart = new charts.SimpleBarChart(this.chartRef, {
137
137
  data: this.props.data,
138
138
  options: this.props.options
139
139
  });
@@ -150,21 +150,21 @@ var DonutChart = function (_BaseChart) {
150
150
  className: "chart-holder" });
151
151
  }
152
152
  }]);
153
- return DonutChart;
153
+ return SimpleBarChart;
154
154
  }(BaseChart);
155
155
 
156
- var LineChart = function (_BaseChart) {
157
- inherits(LineChart, _BaseChart);
156
+ var StackedBarChart = function (_BaseChart) {
157
+ inherits(StackedBarChart, _BaseChart);
158
158
 
159
- function LineChart() {
160
- classCallCheck(this, LineChart);
161
- return possibleConstructorReturn(this, (LineChart.__proto__ || Object.getPrototypeOf(LineChart)).apply(this, arguments));
159
+ function StackedBarChart() {
160
+ classCallCheck(this, StackedBarChart);
161
+ return possibleConstructorReturn(this, (StackedBarChart.__proto__ || Object.getPrototypeOf(StackedBarChart)).apply(this, arguments));
162
162
  }
163
163
 
164
- createClass(LineChart, [{
164
+ createClass(StackedBarChart, [{
165
165
  key: "componentDidMount",
166
166
  value: function componentDidMount() {
167
- this.chart = new charts.LineChart(this.chartRef, {
167
+ this.chart = new charts.StackedBarChart(this.chartRef, {
168
168
  data: this.props.data,
169
169
  options: this.props.options
170
170
  });
@@ -181,21 +181,21 @@ var LineChart = function (_BaseChart) {
181
181
  className: "chart-holder" });
182
182
  }
183
183
  }]);
184
- return LineChart;
184
+ return StackedBarChart;
185
185
  }(BaseChart);
186
186
 
187
- var ScatterChart = function (_BaseChart) {
188
- inherits(ScatterChart, _BaseChart);
187
+ var BubbleChart = function (_BaseChart) {
188
+ inherits(BubbleChart, _BaseChart);
189
189
 
190
- function ScatterChart() {
191
- classCallCheck(this, ScatterChart);
192
- return possibleConstructorReturn(this, (ScatterChart.__proto__ || Object.getPrototypeOf(ScatterChart)).apply(this, arguments));
190
+ function BubbleChart() {
191
+ classCallCheck(this, BubbleChart);
192
+ return possibleConstructorReturn(this, (BubbleChart.__proto__ || Object.getPrototypeOf(BubbleChart)).apply(this, arguments));
193
193
  }
194
194
 
195
- createClass(ScatterChart, [{
195
+ createClass(BubbleChart, [{
196
196
  key: "componentDidMount",
197
197
  value: function componentDidMount() {
198
- this.chart = new charts.ScatterChart(this.chartRef, {
198
+ this.chart = new charts.BubbleChart(this.chartRef, {
199
199
  data: this.props.data,
200
200
  options: this.props.options
201
201
  });
@@ -212,21 +212,21 @@ var ScatterChart = function (_BaseChart) {
212
212
  className: "chart-holder" });
213
213
  }
214
214
  }]);
215
- return ScatterChart;
215
+ return BubbleChart;
216
216
  }(BaseChart);
217
217
 
218
- var GroupedBarChart = function (_BaseChart) {
219
- inherits(GroupedBarChart, _BaseChart);
218
+ var DonutChart = function (_BaseChart) {
219
+ inherits(DonutChart, _BaseChart);
220
220
 
221
- function GroupedBarChart() {
222
- classCallCheck(this, GroupedBarChart);
223
- return possibleConstructorReturn(this, (GroupedBarChart.__proto__ || Object.getPrototypeOf(GroupedBarChart)).apply(this, arguments));
221
+ function DonutChart() {
222
+ classCallCheck(this, DonutChart);
223
+ return possibleConstructorReturn(this, (DonutChart.__proto__ || Object.getPrototypeOf(DonutChart)).apply(this, arguments));
224
224
  }
225
225
 
226
- createClass(GroupedBarChart, [{
226
+ createClass(DonutChart, [{
227
227
  key: "componentDidMount",
228
228
  value: function componentDidMount() {
229
- this.chart = new charts.GroupedBarChart(this.chartRef, {
229
+ this.chart = new charts.DonutChart(this.chartRef, {
230
230
  data: this.props.data,
231
231
  options: this.props.options
232
232
  });
@@ -243,21 +243,21 @@ var GroupedBarChart = function (_BaseChart) {
243
243
  className: "chart-holder" });
244
244
  }
245
245
  }]);
246
- return GroupedBarChart;
246
+ return DonutChart;
247
247
  }(BaseChart);
248
248
 
249
- var SimpleBarChart = function (_BaseChart) {
250
- inherits(SimpleBarChart, _BaseChart);
249
+ var LineChart = function (_BaseChart) {
250
+ inherits(LineChart, _BaseChart);
251
251
 
252
- function SimpleBarChart() {
253
- classCallCheck(this, SimpleBarChart);
254
- return possibleConstructorReturn(this, (SimpleBarChart.__proto__ || Object.getPrototypeOf(SimpleBarChart)).apply(this, arguments));
252
+ function LineChart() {
253
+ classCallCheck(this, LineChart);
254
+ return possibleConstructorReturn(this, (LineChart.__proto__ || Object.getPrototypeOf(LineChart)).apply(this, arguments));
255
255
  }
256
256
 
257
- createClass(SimpleBarChart, [{
257
+ createClass(LineChart, [{
258
258
  key: "componentDidMount",
259
259
  value: function componentDidMount() {
260
- this.chart = new charts.SimpleBarChart(this.chartRef, {
260
+ this.chart = new charts.LineChart(this.chartRef, {
261
261
  data: this.props.data,
262
262
  options: this.props.options
263
263
  });
@@ -274,21 +274,21 @@ var SimpleBarChart = function (_BaseChart) {
274
274
  className: "chart-holder" });
275
275
  }
276
276
  }]);
277
- return SimpleBarChart;
277
+ return LineChart;
278
278
  }(BaseChart);
279
279
 
280
- var StackedBarChart = function (_BaseChart) {
281
- inherits(StackedBarChart, _BaseChart);
280
+ var PieChart = function (_BaseChart) {
281
+ inherits(PieChart, _BaseChart);
282
282
 
283
- function StackedBarChart() {
284
- classCallCheck(this, StackedBarChart);
285
- return possibleConstructorReturn(this, (StackedBarChart.__proto__ || Object.getPrototypeOf(StackedBarChart)).apply(this, arguments));
283
+ function PieChart() {
284
+ classCallCheck(this, PieChart);
285
+ return possibleConstructorReturn(this, (PieChart.__proto__ || Object.getPrototypeOf(PieChart)).apply(this, arguments));
286
286
  }
287
287
 
288
- createClass(StackedBarChart, [{
288
+ createClass(PieChart, [{
289
289
  key: "componentDidMount",
290
290
  value: function componentDidMount() {
291
- this.chart = new charts.StackedBarChart(this.chartRef, {
291
+ this.chart = new charts.PieChart(this.chartRef, {
292
292
  data: this.props.data,
293
293
  options: this.props.options
294
294
  });
@@ -305,13 +305,45 @@ var StackedBarChart = function (_BaseChart) {
305
305
  className: "chart-holder" });
306
306
  }
307
307
  }]);
308
- return StackedBarChart;
308
+ return PieChart;
309
+ }(BaseChart);
310
+
311
+ var ScatterChart = function (_BaseChart) {
312
+ inherits(ScatterChart, _BaseChart);
313
+
314
+ function ScatterChart() {
315
+ classCallCheck(this, ScatterChart);
316
+ return possibleConstructorReturn(this, (ScatterChart.__proto__ || Object.getPrototypeOf(ScatterChart)).apply(this, arguments));
317
+ }
318
+
319
+ createClass(ScatterChart, [{
320
+ key: "componentDidMount",
321
+ value: function componentDidMount() {
322
+ this.chart = new charts.ScatterChart(this.chartRef, {
323
+ data: this.props.data,
324
+ options: this.props.options
325
+ });
326
+ }
327
+ }, {
328
+ key: "render",
329
+ value: function render() {
330
+ var _this2 = this;
331
+
332
+ return React.createElement("div", {
333
+ ref: function ref(chartRef) {
334
+ return _this2.chartRef = chartRef;
335
+ },
336
+ className: "chart-holder" });
337
+ }
338
+ }]);
339
+ return ScatterChart;
309
340
  }(BaseChart);
310
341
 
311
- exports.PieChart = PieChart;
312
- exports.DonutChart = DonutChart;
313
- exports.LineChart = LineChart;
314
- exports.ScatterChart = ScatterChart;
315
342
  exports.GroupedBarChart = GroupedBarChart;
316
343
  exports.SimpleBarChart = SimpleBarChart;
317
344
  exports.StackedBarChart = StackedBarChart;
345
+ exports.BubbleChart = BubbleChart;
346
+ exports.DonutChart = DonutChart;
347
+ exports.LineChart = LineChart;
348
+ exports.PieChart = PieChart;
349
+ exports.ScatterChart = ScatterChart;
package/index.js CHANGED
@@ -1,9 +1,10 @@
1
- import PieChart from "./pie-chart";
2
- import DonutChart from "./donut-chart";
3
- import LineChart from "./line-chart";
4
- import ScatterChart from "./scatter-chart";
5
1
  import GroupedBarChart from "./bar-chart-grouped";
6
2
  import SimpleBarChart from "./bar-chart-simple";
7
3
  import StackedBarChart from "./bar-chart-stacked";
4
+ import BubbleChart from "./bubble-chart";
5
+ import DonutChart from "./donut-chart";
6
+ import LineChart from "./line-chart";
7
+ import PieChart from "./pie-chart";
8
+ import ScatterChart from "./scatter-chart";
8
9
 
9
- export { PieChart, DonutChart, LineChart, ScatterChart, GroupedBarChart, SimpleBarChart, StackedBarChart };
10
+ export { GroupedBarChart, SimpleBarChart, StackedBarChart, BubbleChart, DonutChart, LineChart, PieChart, ScatterChart };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon/charts-react",
3
- "version": "0.29.0",
3
+ "version": "0.29.1",
4
4
  "description": "Carbon charting components for React",
5
5
  "main": "./bundle.js",
6
6
  "scripts": {
@@ -44,16 +44,16 @@
44
44
  },
45
45
  "homepage": "https://github.com/IBM/carbon-charts#readme",
46
46
  "dependencies": {
47
- "@carbon/charts": "^0.29.0"
47
+ "@carbon/charts": "^0.29.1"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "react": "^16.6.3",
51
51
  "react-dom": "^16.6.3"
52
52
  },
53
53
  "devDependencies": {
54
- "@storybook/addon-knobs": "5.0.11",
55
- "@storybook/addon-options": "5.0.11",
56
- "@storybook/react": "5.0.11",
54
+ "@storybook/addon-knobs": "5.3.12",
55
+ "@storybook/addon-options": "5.3.12",
56
+ "@storybook/react": "5.3.12",
57
57
  "babel-cli": "6.26.0",
58
58
  "babel-core": "6.26.0",
59
59
  "babel-loader": "7.1.2",