@carbon/charts-react 0.27.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 +35 -0
- package/bubble-chart.js +47 -0
- package/bundle.js +92 -60
- package/index.js +6 -5
- package/package.json +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
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
|
+
|
|
14
|
+
# [0.29.0](https://github.com/IBM/carbon-charts/compare/v0.28.1...v0.29.0) (2020-02-07)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @carbon/charts-react
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.28.1](https://github.com/IBM/carbon-charts/compare/v0.28.0...v0.28.1) (2020-01-30)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @carbon/charts-react
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [0.28.0](https://github.com/IBM/carbon-charts/compare/v0.27.0...v0.28.0) (2020-01-21)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* **core:** add support for horizontal bar charts ([#415](https://github.com/IBM/carbon-charts/issues/415)) ([6a480f0](https://github.com/IBM/carbon-charts/commit/6a480f0))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
# [0.27.0](https://github.com/IBM/carbon-charts/compare/v0.26.1...v0.27.0) (2020-01-20)
|
|
7
42
|
|
|
8
43
|
**Note:** Version bump only for package @carbon/charts-react
|
package/bubble-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 { 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
|
|
95
|
-
inherits(
|
|
94
|
+
var GroupedBarChart = function (_BaseChart) {
|
|
95
|
+
inherits(GroupedBarChart, _BaseChart);
|
|
96
96
|
|
|
97
|
-
function
|
|
98
|
-
classCallCheck(this,
|
|
99
|
-
return possibleConstructorReturn(this, (
|
|
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(
|
|
102
|
+
createClass(GroupedBarChart, [{
|
|
103
103
|
key: "componentDidMount",
|
|
104
104
|
value: function componentDidMount() {
|
|
105
|
-
this.chart = new charts.
|
|
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
|
|
122
|
+
return GroupedBarChart;
|
|
123
123
|
}(BaseChart);
|
|
124
124
|
|
|
125
|
-
var
|
|
126
|
-
inherits(
|
|
125
|
+
var SimpleBarChart = function (_BaseChart) {
|
|
126
|
+
inherits(SimpleBarChart, _BaseChart);
|
|
127
127
|
|
|
128
|
-
function
|
|
129
|
-
classCallCheck(this,
|
|
130
|
-
return possibleConstructorReturn(this, (
|
|
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(
|
|
133
|
+
createClass(SimpleBarChart, [{
|
|
134
134
|
key: "componentDidMount",
|
|
135
135
|
value: function componentDidMount() {
|
|
136
|
-
this.chart = new charts.
|
|
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
|
|
153
|
+
return SimpleBarChart;
|
|
154
154
|
}(BaseChart);
|
|
155
155
|
|
|
156
|
-
var
|
|
157
|
-
inherits(
|
|
156
|
+
var StackedBarChart = function (_BaseChart) {
|
|
157
|
+
inherits(StackedBarChart, _BaseChart);
|
|
158
158
|
|
|
159
|
-
function
|
|
160
|
-
classCallCheck(this,
|
|
161
|
-
return possibleConstructorReturn(this, (
|
|
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(
|
|
164
|
+
createClass(StackedBarChart, [{
|
|
165
165
|
key: "componentDidMount",
|
|
166
166
|
value: function componentDidMount() {
|
|
167
|
-
this.chart = new charts.
|
|
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
|
|
184
|
+
return StackedBarChart;
|
|
185
185
|
}(BaseChart);
|
|
186
186
|
|
|
187
|
-
var
|
|
188
|
-
inherits(
|
|
187
|
+
var BubbleChart = function (_BaseChart) {
|
|
188
|
+
inherits(BubbleChart, _BaseChart);
|
|
189
189
|
|
|
190
|
-
function
|
|
191
|
-
classCallCheck(this,
|
|
192
|
-
return possibleConstructorReturn(this, (
|
|
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(
|
|
195
|
+
createClass(BubbleChart, [{
|
|
196
196
|
key: "componentDidMount",
|
|
197
197
|
value: function componentDidMount() {
|
|
198
|
-
this.chart = new charts.
|
|
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
|
|
215
|
+
return BubbleChart;
|
|
216
216
|
}(BaseChart);
|
|
217
217
|
|
|
218
|
-
var
|
|
219
|
-
inherits(
|
|
218
|
+
var DonutChart = function (_BaseChart) {
|
|
219
|
+
inherits(DonutChart, _BaseChart);
|
|
220
220
|
|
|
221
|
-
function
|
|
222
|
-
classCallCheck(this,
|
|
223
|
-
return possibleConstructorReturn(this, (
|
|
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(
|
|
226
|
+
createClass(DonutChart, [{
|
|
227
227
|
key: "componentDidMount",
|
|
228
228
|
value: function componentDidMount() {
|
|
229
|
-
this.chart = new charts.
|
|
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
|
|
246
|
+
return DonutChart;
|
|
247
247
|
}(BaseChart);
|
|
248
248
|
|
|
249
|
-
var
|
|
250
|
-
inherits(
|
|
249
|
+
var LineChart = function (_BaseChart) {
|
|
250
|
+
inherits(LineChart, _BaseChart);
|
|
251
251
|
|
|
252
|
-
function
|
|
253
|
-
classCallCheck(this,
|
|
254
|
-
return possibleConstructorReturn(this, (
|
|
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(
|
|
257
|
+
createClass(LineChart, [{
|
|
258
258
|
key: "componentDidMount",
|
|
259
259
|
value: function componentDidMount() {
|
|
260
|
-
this.chart = new charts.
|
|
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
|
|
277
|
+
return LineChart;
|
|
278
278
|
}(BaseChart);
|
|
279
279
|
|
|
280
|
-
var
|
|
281
|
-
inherits(
|
|
280
|
+
var PieChart = function (_BaseChart) {
|
|
281
|
+
inherits(PieChart, _BaseChart);
|
|
282
282
|
|
|
283
|
-
function
|
|
284
|
-
classCallCheck(this,
|
|
285
|
-
return possibleConstructorReturn(this, (
|
|
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(
|
|
288
|
+
createClass(PieChart, [{
|
|
289
289
|
key: "componentDidMount",
|
|
290
290
|
value: function componentDidMount() {
|
|
291
|
-
this.chart = new charts.
|
|
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
|
|
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 {
|
|
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.
|
|
3
|
+
"version": "0.29.1",
|
|
4
4
|
"description": "Carbon charting components for React",
|
|
5
5
|
"main": "./bundle.js",
|
|
6
6
|
"scripts": {
|
|
@@ -44,17 +44,16 @@
|
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://github.com/IBM/carbon-charts#readme",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@carbon/charts": "^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.
|
|
55
|
-
"@storybook/addon-options": "5.
|
|
56
|
-
"@storybook/react": "5.
|
|
57
|
-
"@storybook/storybook-deployer": "2.8.1",
|
|
54
|
+
"@storybook/addon-knobs": "5.3.12",
|
|
55
|
+
"@storybook/addon-options": "5.3.12",
|
|
56
|
+
"@storybook/react": "5.3.12",
|
|
58
57
|
"babel-cli": "6.26.0",
|
|
59
58
|
"babel-core": "6.26.0",
|
|
60
59
|
"babel-loader": "7.1.2",
|
|
@@ -66,13 +65,13 @@
|
|
|
66
65
|
"base64-inline-loader": "1.1.0",
|
|
67
66
|
"css-loader": "0.28.7",
|
|
68
67
|
"img-loader": "2.0.0",
|
|
69
|
-
"node-sass": "4.10.0",
|
|
70
68
|
"react": "16.6.3",
|
|
71
69
|
"react-dom": "16.6.3",
|
|
72
70
|
"rollup": "0.67.3",
|
|
73
71
|
"rollup-plugin-babel": "3.0.4",
|
|
74
72
|
"rollup-plugin-commonjs": "9.2.0",
|
|
75
|
-
"sass
|
|
73
|
+
"sass": "1.25.0",
|
|
74
|
+
"sass-loader": "8.0.0",
|
|
76
75
|
"style-loader": "0.19.0",
|
|
77
76
|
"ts-loader": "6.2.0",
|
|
78
77
|
"url-loader": "0.6.2"
|