@carbon/charts-react 0.41.6 → 0.41.11
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 +40 -0
- package/area-chart-stacked.d.ts +12 -0
- package/area-chart-stacked.js +39 -47
- package/area-chart.d.ts +12 -0
- package/area-chart.js +39 -47
- package/bar-chart-grouped.d.ts +12 -0
- package/bar-chart-grouped.js +39 -47
- package/bar-chart-simple.d.ts +12 -0
- package/bar-chart-simple.js +39 -47
- package/bar-chart-stacked.d.ts +12 -0
- package/bar-chart-stacked.js +39 -47
- package/base-chart.d.ts +17 -0
- package/base-chart.js +46 -53
- package/bubble-chart.d.ts +12 -0
- package/bubble-chart.js +39 -47
- package/bundle.js +1 -1
- package/combo-chart.d.ts +12 -0
- package/combo-chart.js +39 -47
- package/donut-chart.d.ts +12 -0
- package/donut-chart.js +39 -47
- package/gauge-chart.d.ts +12 -0
- package/gauge-chart.js +39 -47
- package/index.d.ts +17 -0
- package/index.js +38 -17
- package/line-chart.d.ts +12 -0
- package/line-chart.js +39 -47
- package/lollipop-chart.d.ts +12 -0
- package/lollipop-chart.js +39 -0
- package/meter-chart.d.ts +12 -0
- package/meter-chart.js +39 -47
- package/package.json +7 -3
- package/pie-chart.d.ts +12 -0
- package/pie-chart.js +39 -47
- package/radar-chart.d.ts +12 -0
- package/radar-chart.js +39 -47
- package/scatter-chart.d.ts +12 -0
- package/scatter-chart.js +39 -47
- package/treemap-chart.d.ts +12 -0
- package/treemap-chart.js +39 -47
package/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import AreaChart from "./area-chart";
|
|
2
|
+
import StackedAreaChart from "./area-chart-stacked";
|
|
3
|
+
import GroupedBarChart from "./bar-chart-grouped";
|
|
4
|
+
import SimpleBarChart from "./bar-chart-simple";
|
|
5
|
+
import StackedBarChart from "./bar-chart-stacked";
|
|
6
|
+
import BubbleChart from "./bubble-chart";
|
|
7
|
+
import DonutChart from "./donut-chart";
|
|
8
|
+
import GaugeChart from "./gauge-chart";
|
|
9
|
+
import LineChart from "./line-chart";
|
|
10
|
+
import LollipopChart from "./lollipop-chart";
|
|
11
|
+
import PieChart from "./pie-chart";
|
|
12
|
+
import ScatterChart from "./scatter-chart";
|
|
13
|
+
import MeterChart from "./meter-chart";
|
|
14
|
+
import RadarChart from "./radar-chart";
|
|
15
|
+
import ComboChart from "./combo-chart";
|
|
16
|
+
import TreemapChart from "./treemap-chart";
|
|
17
|
+
export { AreaChart, StackedAreaChart, GroupedBarChart, SimpleBarChart, StackedBarChart, BubbleChart, DonutChart, GaugeChart, LineChart, LollipopChart, PieChart, ScatterChart, MeterChart, RadarChart, ComboChart, TreemapChart };
|
package/index.js
CHANGED
|
@@ -1,17 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TreemapChart = exports.ComboChart = exports.RadarChart = exports.MeterChart = exports.ScatterChart = exports.PieChart = exports.LollipopChart = exports.LineChart = exports.GaugeChart = exports.DonutChart = exports.BubbleChart = exports.StackedBarChart = exports.SimpleBarChart = exports.GroupedBarChart = exports.StackedAreaChart = exports.AreaChart = void 0;
|
|
7
|
+
var area_chart_1 = __importDefault(require("./area-chart"));
|
|
8
|
+
exports.AreaChart = area_chart_1.default;
|
|
9
|
+
var area_chart_stacked_1 = __importDefault(require("./area-chart-stacked"));
|
|
10
|
+
exports.StackedAreaChart = area_chart_stacked_1.default;
|
|
11
|
+
var bar_chart_grouped_1 = __importDefault(require("./bar-chart-grouped"));
|
|
12
|
+
exports.GroupedBarChart = bar_chart_grouped_1.default;
|
|
13
|
+
var bar_chart_simple_1 = __importDefault(require("./bar-chart-simple"));
|
|
14
|
+
exports.SimpleBarChart = bar_chart_simple_1.default;
|
|
15
|
+
var bar_chart_stacked_1 = __importDefault(require("./bar-chart-stacked"));
|
|
16
|
+
exports.StackedBarChart = bar_chart_stacked_1.default;
|
|
17
|
+
var bubble_chart_1 = __importDefault(require("./bubble-chart"));
|
|
18
|
+
exports.BubbleChart = bubble_chart_1.default;
|
|
19
|
+
var donut_chart_1 = __importDefault(require("./donut-chart"));
|
|
20
|
+
exports.DonutChart = donut_chart_1.default;
|
|
21
|
+
var gauge_chart_1 = __importDefault(require("./gauge-chart"));
|
|
22
|
+
exports.GaugeChart = gauge_chart_1.default;
|
|
23
|
+
var line_chart_1 = __importDefault(require("./line-chart"));
|
|
24
|
+
exports.LineChart = line_chart_1.default;
|
|
25
|
+
var lollipop_chart_1 = __importDefault(require("./lollipop-chart"));
|
|
26
|
+
exports.LollipopChart = lollipop_chart_1.default;
|
|
27
|
+
var pie_chart_1 = __importDefault(require("./pie-chart"));
|
|
28
|
+
exports.PieChart = pie_chart_1.default;
|
|
29
|
+
var scatter_chart_1 = __importDefault(require("./scatter-chart"));
|
|
30
|
+
exports.ScatterChart = scatter_chart_1.default;
|
|
31
|
+
var meter_chart_1 = __importDefault(require("./meter-chart"));
|
|
32
|
+
exports.MeterChart = meter_chart_1.default;
|
|
33
|
+
var radar_chart_1 = __importDefault(require("./radar-chart"));
|
|
34
|
+
exports.RadarChart = radar_chart_1.default;
|
|
35
|
+
var combo_chart_1 = __importDefault(require("./combo-chart"));
|
|
36
|
+
exports.ComboChart = combo_chart_1.default;
|
|
37
|
+
var treemap_chart_1 = __importDefault(require("./treemap-chart"));
|
|
38
|
+
exports.TreemapChart = treemap_chart_1.default;
|
package/line-chart.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LineChart as LC } from "@carbon/charts";
|
|
2
|
+
import { ChartConfig, LineChartOptions } from "@carbon/charts/interfaces";
|
|
3
|
+
import BaseChart from "./base-chart";
|
|
4
|
+
declare type LineChartProps = ChartConfig<LineChartOptions>;
|
|
5
|
+
export default class LineChart extends BaseChart<LineChartOptions> {
|
|
6
|
+
chartRef?: HTMLDivElement;
|
|
7
|
+
props: LineChartProps;
|
|
8
|
+
chart: LC;
|
|
9
|
+
componentDidMount(): void;
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
package/line-chart.js
CHANGED
|
@@ -1,47 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
className: "chart-holder" });
|
|
41
|
-
}
|
|
42
|
-
}]);
|
|
43
|
-
|
|
44
|
-
return LineChart;
|
|
45
|
-
}(BaseChart);
|
|
46
|
-
|
|
47
|
-
export default LineChart;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
var react_1 = __importDefault(require("react"));
|
|
20
|
+
var charts_1 = require("@carbon/charts");
|
|
21
|
+
var base_chart_1 = __importDefault(require("./base-chart"));
|
|
22
|
+
var LineChart = /** @class */ (function (_super) {
|
|
23
|
+
__extends(LineChart, _super);
|
|
24
|
+
function LineChart() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
LineChart.prototype.componentDidMount = function () {
|
|
28
|
+
this.chart = new charts_1.LineChart(this.chartRef, {
|
|
29
|
+
data: this.props.data,
|
|
30
|
+
options: this.props.options,
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
LineChart.prototype.render = function () {
|
|
34
|
+
var _this = this;
|
|
35
|
+
return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
|
|
36
|
+
};
|
|
37
|
+
return LineChart;
|
|
38
|
+
}(base_chart_1.default));
|
|
39
|
+
exports.default = LineChart;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LollipopChart as LC } from "@carbon/charts";
|
|
2
|
+
import { ChartConfig, LollipopChartOptions } from "@carbon/charts/interfaces";
|
|
3
|
+
import BaseChart from "./base-chart";
|
|
4
|
+
declare type LollipopChartProps = ChartConfig<LollipopChartOptions>;
|
|
5
|
+
export default class LollipopChart extends BaseChart<LollipopChartOptions> {
|
|
6
|
+
chartRef?: HTMLDivElement;
|
|
7
|
+
props: LollipopChartProps;
|
|
8
|
+
chart: LC;
|
|
9
|
+
componentDidMount(): void;
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
var react_1 = __importDefault(require("react"));
|
|
20
|
+
var charts_1 = require("@carbon/charts");
|
|
21
|
+
var base_chart_1 = __importDefault(require("./base-chart"));
|
|
22
|
+
var LollipopChart = /** @class */ (function (_super) {
|
|
23
|
+
__extends(LollipopChart, _super);
|
|
24
|
+
function LollipopChart() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
LollipopChart.prototype.componentDidMount = function () {
|
|
28
|
+
this.chart = new charts_1.LollipopChart(this.chartRef, {
|
|
29
|
+
data: this.props.data,
|
|
30
|
+
options: this.props.options,
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
LollipopChart.prototype.render = function () {
|
|
34
|
+
var _this = this;
|
|
35
|
+
return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
|
|
36
|
+
};
|
|
37
|
+
return LollipopChart;
|
|
38
|
+
}(base_chart_1.default));
|
|
39
|
+
exports.default = LollipopChart;
|
package/meter-chart.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MeterChart as MC } from "@carbon/charts";
|
|
2
|
+
import BaseChart from "./base-chart";
|
|
3
|
+
import { ChartConfig, MeterChartOptions } from "@carbon/charts/interfaces";
|
|
4
|
+
declare type MeterChartProps = ChartConfig<MeterChartOptions>;
|
|
5
|
+
export default class MeterChart extends BaseChart<MeterChartOptions> {
|
|
6
|
+
chartRef: HTMLDivElement;
|
|
7
|
+
props: MeterChartProps;
|
|
8
|
+
chart: MC;
|
|
9
|
+
componentDidMount(): void;
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
package/meter-chart.js
CHANGED
|
@@ -1,47 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
className: "chart-holder" });
|
|
41
|
-
}
|
|
42
|
-
}]);
|
|
43
|
-
|
|
44
|
-
return MeterChart;
|
|
45
|
-
}(BaseChart);
|
|
46
|
-
|
|
47
|
-
export default MeterChart;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
var react_1 = __importDefault(require("react"));
|
|
20
|
+
var charts_1 = require("@carbon/charts");
|
|
21
|
+
var base_chart_1 = __importDefault(require("./base-chart"));
|
|
22
|
+
var MeterChart = /** @class */ (function (_super) {
|
|
23
|
+
__extends(MeterChart, _super);
|
|
24
|
+
function MeterChart() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
MeterChart.prototype.componentDidMount = function () {
|
|
28
|
+
this.chart = new charts_1.MeterChart(this.chartRef, {
|
|
29
|
+
data: this.props.data,
|
|
30
|
+
options: this.props.options,
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
MeterChart.prototype.render = function () {
|
|
34
|
+
var _this = this;
|
|
35
|
+
return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
|
|
36
|
+
};
|
|
37
|
+
return MeterChart;
|
|
38
|
+
}(base_chart_1.default));
|
|
39
|
+
exports.default = MeterChart;
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/charts-react",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.11",
|
|
4
4
|
"description": "Carbon charting components for React",
|
|
5
5
|
"main": "./bundle.js",
|
|
6
6
|
"module": "./index.js",
|
|
7
|
+
"types": "./index.d.ts",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"start": "yarn run storybook",
|
|
9
10
|
"build": "bash build.sh",
|
|
10
11
|
"storybook": "start-storybook -p 9006 -c .storybook -s ./assets",
|
|
11
|
-
"demo:build": "build-storybook -o demo/bundle --quiet",
|
|
12
|
+
"demo:build": "yarn build && build-storybook -o demo/bundle --quiet",
|
|
12
13
|
"clean": "rm -rf dist demo/bundle"
|
|
13
14
|
},
|
|
14
15
|
"repository": {
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
},
|
|
47
48
|
"homepage": "https://github.com/carbon-design-system/carbon-charts#readme",
|
|
48
49
|
"dependencies": {
|
|
49
|
-
"@carbon/charts": "^0.41.
|
|
50
|
+
"@carbon/charts": "^0.41.11"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
53
|
"react": "^16.6.3",
|
|
@@ -56,6 +57,8 @@
|
|
|
56
57
|
"@storybook/addon-knobs": "5.3.12",
|
|
57
58
|
"@storybook/addon-options": "5.3.12",
|
|
58
59
|
"@storybook/react": "5.3.12",
|
|
60
|
+
"@types/react": "17.0.0",
|
|
61
|
+
"@types/react-dom": "17.0.0",
|
|
59
62
|
"babel-cli": "6.26.0",
|
|
60
63
|
"babel-core": "6.26.0",
|
|
61
64
|
"babel-loader": "7.1.2",
|
|
@@ -76,6 +79,7 @@
|
|
|
76
79
|
"sass": "1.25.0",
|
|
77
80
|
"sass-loader": "8.0.0",
|
|
78
81
|
"style-loader": "0.19.0",
|
|
82
|
+
"typescript": "4.1.2",
|
|
79
83
|
"url-loader": "0.6.2"
|
|
80
84
|
},
|
|
81
85
|
"publishConfig": {
|
package/pie-chart.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PieChart as PC } from "@carbon/charts";
|
|
2
|
+
import BaseChart from "./base-chart";
|
|
3
|
+
import { ChartConfig, PieChartOptions } from "@carbon/charts/interfaces";
|
|
4
|
+
declare type PieChartProps = ChartConfig<PieChartOptions>;
|
|
5
|
+
export default class PieChart extends BaseChart<PieChartOptions> {
|
|
6
|
+
chartRef: HTMLDivElement;
|
|
7
|
+
props: PieChartProps;
|
|
8
|
+
chart: PC;
|
|
9
|
+
componentDidMount(): void;
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
package/pie-chart.js
CHANGED
|
@@ -1,47 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
className: "chart-holder" });
|
|
41
|
-
}
|
|
42
|
-
}]);
|
|
43
|
-
|
|
44
|
-
return PieChart;
|
|
45
|
-
}(BaseChart);
|
|
46
|
-
|
|
47
|
-
export default PieChart;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
var react_1 = __importDefault(require("react"));
|
|
20
|
+
var charts_1 = require("@carbon/charts");
|
|
21
|
+
var base_chart_1 = __importDefault(require("./base-chart"));
|
|
22
|
+
var PieChart = /** @class */ (function (_super) {
|
|
23
|
+
__extends(PieChart, _super);
|
|
24
|
+
function PieChart() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
PieChart.prototype.componentDidMount = function () {
|
|
28
|
+
this.chart = new charts_1.PieChart(this.chartRef, {
|
|
29
|
+
data: this.props.data,
|
|
30
|
+
options: this.props.options,
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
PieChart.prototype.render = function () {
|
|
34
|
+
var _this = this;
|
|
35
|
+
return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
|
|
36
|
+
};
|
|
37
|
+
return PieChart;
|
|
38
|
+
}(base_chart_1.default));
|
|
39
|
+
exports.default = PieChart;
|
package/radar-chart.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RadarChart as RC } from "@carbon/charts";
|
|
2
|
+
import BaseChart from "./base-chart";
|
|
3
|
+
import { ChartConfig, RadarChartOptions } from "@carbon/charts/interfaces";
|
|
4
|
+
declare type RadarChartProps = ChartConfig<RadarChartOptions>;
|
|
5
|
+
export default class RadarChart extends BaseChart<RadarChartOptions> {
|
|
6
|
+
chartRef: HTMLDivElement;
|
|
7
|
+
props: RadarChartProps;
|
|
8
|
+
chart: RC;
|
|
9
|
+
componentDidMount(): void;
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
package/radar-chart.js
CHANGED
|
@@ -1,47 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
className: "chart-holder" });
|
|
41
|
-
}
|
|
42
|
-
}]);
|
|
43
|
-
|
|
44
|
-
return RadarChart;
|
|
45
|
-
}(BaseChart);
|
|
46
|
-
|
|
47
|
-
export default RadarChart;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
var react_1 = __importDefault(require("react"));
|
|
20
|
+
var charts_1 = require("@carbon/charts");
|
|
21
|
+
var base_chart_1 = __importDefault(require("./base-chart"));
|
|
22
|
+
var RadarChart = /** @class */ (function (_super) {
|
|
23
|
+
__extends(RadarChart, _super);
|
|
24
|
+
function RadarChart() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
RadarChart.prototype.componentDidMount = function () {
|
|
28
|
+
this.chart = new charts_1.RadarChart(this.chartRef, {
|
|
29
|
+
data: this.props.data,
|
|
30
|
+
options: this.props.options,
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
RadarChart.prototype.render = function () {
|
|
34
|
+
var _this = this;
|
|
35
|
+
return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
|
|
36
|
+
};
|
|
37
|
+
return RadarChart;
|
|
38
|
+
}(base_chart_1.default));
|
|
39
|
+
exports.default = RadarChart;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ScatterChart as SC } from "@carbon/charts";
|
|
2
|
+
import { ChartConfig, ScatterChartOptions } from "@carbon/charts/interfaces";
|
|
3
|
+
import BaseChart from "./base-chart";
|
|
4
|
+
declare type ScatterChartProps = ChartConfig<ScatterChartOptions>;
|
|
5
|
+
export default class ScatterChart extends BaseChart<ScatterChartOptions> {
|
|
6
|
+
chartRef: HTMLDivElement;
|
|
7
|
+
props: ScatterChartProps;
|
|
8
|
+
chart: SC;
|
|
9
|
+
componentDidMount(): void;
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
export {};
|