@carbon/charts-react 1.7.6 → 1.9.0-next.0

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.
Files changed (129) hide show
  1. package/README.md +15 -21
  2. package/dist/charts/AlluvialChart.d.ts +5 -0
  3. package/dist/charts/AreaChart.d.ts +5 -0
  4. package/dist/charts/BaseChart.d.ts +16 -0
  5. package/dist/charts/BoxplotChart.d.ts +5 -0
  6. package/dist/charts/BubbleChart.d.ts +5 -0
  7. package/dist/charts/BulletChart.d.ts +5 -0
  8. package/dist/charts/ChoroplethChart.d.ts +5 -0
  9. package/dist/charts/CirclePackChart.d.ts +5 -0
  10. package/dist/charts/ComboChart.d.ts +5 -0
  11. package/dist/charts/DonutChart.d.ts +5 -0
  12. package/dist/charts/GaugeChart.d.ts +5 -0
  13. package/dist/charts/GroupedBarChart.d.ts +5 -0
  14. package/dist/charts/HeatmapChart.d.ts +5 -0
  15. package/dist/charts/HistogramChart.d.ts +5 -0
  16. package/dist/charts/LineChart.d.ts +5 -0
  17. package/dist/charts/LollipopChart.d.ts +5 -0
  18. package/dist/charts/MeterChart.d.ts +5 -0
  19. package/dist/charts/PieChart.d.ts +5 -0
  20. package/dist/charts/RadarChart.d.ts +5 -0
  21. package/dist/charts/ScatterChart.d.ts +5 -0
  22. package/dist/charts/SimpleBarChart.d.ts +5 -0
  23. package/dist/charts/StackedAreaChart.d.ts +5 -0
  24. package/dist/charts/StackedBarChart.d.ts +5 -0
  25. package/dist/charts/TreeChart.d.ts +5 -0
  26. package/dist/charts/TreemapChart.d.ts +5 -0
  27. package/dist/charts/WordCloudChart.d.ts +5 -0
  28. package/dist/charts/index.d.ts +26 -0
  29. package/dist/diagrams/CardNode.d.ts +12 -0
  30. package/dist/diagrams/CardNodeColumn.d.ts +7 -0
  31. package/dist/diagrams/CardNodeLabel.d.ts +6 -0
  32. package/dist/diagrams/CardNodeSubtitle.d.ts +6 -0
  33. package/dist/diagrams/CardNodeTitle.d.ts +6 -0
  34. package/dist/diagrams/Edge.d.ts +17 -0
  35. package/dist/diagrams/Marker.d.ts +20 -0
  36. package/dist/diagrams/ShapeNode.d.ts +17 -0
  37. package/dist/diagrams/index.d.ts +9 -0
  38. package/{diagrams/configs.d.ts → dist/diagrams/utils.d.ts} +1 -1
  39. package/dist/index.d.ts +2 -0
  40. package/dist/index.js +114 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/index.mjs +23083 -0
  43. package/dist/index.mjs.map +1 -0
  44. package/dist/styles.css +28463 -0
  45. package/dist/styles.css.map +1 -0
  46. package/dist/styles.min.css +1 -0
  47. package/dist/styles.min.css.map +1 -0
  48. package/package.json +100 -58
  49. package/CHANGELOG.md +0 -2107
  50. package/alluvial-chart.d.ts +0 -12
  51. package/alluvial-chart.js +0 -42
  52. package/area-chart-stacked.d.ts +0 -12
  53. package/area-chart-stacked.js +0 -42
  54. package/area-chart.d.ts +0 -12
  55. package/area-chart.js +0 -42
  56. package/bar-chart-grouped.d.ts +0 -12
  57. package/bar-chart-grouped.js +0 -42
  58. package/bar-chart-simple.d.ts +0 -12
  59. package/bar-chart-simple.js +0 -42
  60. package/bar-chart-stacked.d.ts +0 -12
  61. package/bar-chart-stacked.js +0 -42
  62. package/base-chart.d.ts +0 -17
  63. package/base-chart.js +0 -46
  64. package/boxplot-chart.d.ts +0 -12
  65. package/boxplot-chart.js +0 -42
  66. package/bubble-chart.d.ts +0 -12
  67. package/bubble-chart.js +0 -42
  68. package/bullet-chart.d.ts +0 -12
  69. package/bullet-chart.js +0 -42
  70. package/bundle.js +0 -1
  71. package/circle-pack-chart.d.ts +0 -12
  72. package/circle-pack-chart.js +0 -42
  73. package/combo-chart.d.ts +0 -12
  74. package/combo-chart.js +0 -42
  75. package/diagrams/CardNode/CardNode.d.ts +0 -54
  76. package/diagrams/CardNode/CardNode.js +0 -84
  77. package/diagrams/CardNode/CardNodeColumn.d.ts +0 -19
  78. package/diagrams/CardNode/CardNodeColumn.js +0 -37
  79. package/diagrams/CardNode/CardNodeLabel.d.ts +0 -15
  80. package/diagrams/CardNode/CardNodeLabel.js +0 -32
  81. package/diagrams/CardNode/CardNodeSubtitle.d.ts +0 -15
  82. package/diagrams/CardNode/CardNodeSubtitle.js +0 -32
  83. package/diagrams/CardNode/CardNodeTitle.d.ts +0 -15
  84. package/diagrams/CardNode/CardNodeTitle.js +0 -32
  85. package/diagrams/CardNode/index.d.ts +0 -6
  86. package/diagrams/CardNode/index.js +0 -16
  87. package/diagrams/Edge/Edge.d.ts +0 -65
  88. package/diagrams/Edge/Edge.js +0 -94
  89. package/diagrams/Edge/index.d.ts +0 -2
  90. package/diagrams/Edge/index.js +0 -7
  91. package/diagrams/Marker/Marker.d.ts +0 -66
  92. package/diagrams/Marker/Marker.js +0 -120
  93. package/diagrams/Marker/index.d.ts +0 -1
  94. package/diagrams/Marker/index.js +0 -14
  95. package/diagrams/ShapeNode/ShapeNode.d.ts +0 -68
  96. package/diagrams/ShapeNode/ShapeNode.js +0 -101
  97. package/diagrams/ShapeNode/index.d.ts +0 -2
  98. package/diagrams/ShapeNode/index.js +0 -7
  99. package/diagrams/configs.js +0 -4
  100. package/donut-chart.d.ts +0 -12
  101. package/donut-chart.js +0 -42
  102. package/gauge-chart.d.ts +0 -12
  103. package/gauge-chart.js +0 -42
  104. package/heatmap-chart.d.ts +0 -12
  105. package/heatmap-chart.js +0 -42
  106. package/histogram-chart.d.ts +0 -12
  107. package/histogram-chart.js +0 -42
  108. package/index.d.ts +0 -25
  109. package/index.js +0 -54
  110. package/line-chart.d.ts +0 -12
  111. package/line-chart.js +0 -42
  112. package/lollipop-chart.d.ts +0 -12
  113. package/lollipop-chart.js +0 -42
  114. package/meter-chart.d.ts +0 -12
  115. package/meter-chart.js +0 -42
  116. package/pie-chart.d.ts +0 -12
  117. package/pie-chart.js +0 -42
  118. package/radar-chart.d.ts +0 -12
  119. package/radar-chart.js +0 -42
  120. package/scatter-chart.d.ts +0 -12
  121. package/scatter-chart.js +0 -42
  122. package/tree-chart.d.ts +0 -12
  123. package/tree-chart.js +0 -42
  124. package/treemap-chart.d.ts +0 -12
  125. package/treemap-chart.js +0 -42
  126. package/utils.d.ts +0 -1
  127. package/utils.js +0 -9
  128. package/wordcloud-chart.d.ts +0 -12
  129. package/wordcloud-chart.js +0 -42
package/index.js DELETED
@@ -1,54 +0,0 @@
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.HeatmapChart = exports.AlluvialChart = exports.WordCloudChart = exports.CirclePackChart = exports.TreemapChart = exports.TreeChart = exports.ComboChart = exports.RadarChart = exports.MeterChart = exports.ScatterChart = exports.PieChart = exports.LollipopChart = exports.LineChart = exports.HistogramChart = exports.GaugeChart = exports.DonutChart = exports.BulletChart = exports.BubbleChart = exports.BoxplotChart = 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 boxplot_chart_1 = __importDefault(require("./boxplot-chart"));
18
- exports.BoxplotChart = boxplot_chart_1.default;
19
- var bubble_chart_1 = __importDefault(require("./bubble-chart"));
20
- exports.BubbleChart = bubble_chart_1.default;
21
- var bullet_chart_1 = __importDefault(require("./bullet-chart"));
22
- exports.BulletChart = bullet_chart_1.default;
23
- var donut_chart_1 = __importDefault(require("./donut-chart"));
24
- exports.DonutChart = donut_chart_1.default;
25
- var gauge_chart_1 = __importDefault(require("./gauge-chart"));
26
- exports.GaugeChart = gauge_chart_1.default;
27
- var histogram_chart_1 = __importDefault(require("./histogram-chart"));
28
- exports.HistogramChart = histogram_chart_1.default;
29
- var line_chart_1 = __importDefault(require("./line-chart"));
30
- exports.LineChart = line_chart_1.default;
31
- var lollipop_chart_1 = __importDefault(require("./lollipop-chart"));
32
- exports.LollipopChart = lollipop_chart_1.default;
33
- var pie_chart_1 = __importDefault(require("./pie-chart"));
34
- exports.PieChart = pie_chart_1.default;
35
- var scatter_chart_1 = __importDefault(require("./scatter-chart"));
36
- exports.ScatterChart = scatter_chart_1.default;
37
- var meter_chart_1 = __importDefault(require("./meter-chart"));
38
- exports.MeterChart = meter_chart_1.default;
39
- var radar_chart_1 = __importDefault(require("./radar-chart"));
40
- exports.RadarChart = radar_chart_1.default;
41
- var combo_chart_1 = __importDefault(require("./combo-chart"));
42
- exports.ComboChart = combo_chart_1.default;
43
- var tree_chart_1 = __importDefault(require("./tree-chart"));
44
- exports.TreeChart = tree_chart_1.default;
45
- var treemap_chart_1 = __importDefault(require("./treemap-chart"));
46
- exports.TreemapChart = treemap_chart_1.default;
47
- var circle_pack_chart_1 = __importDefault(require("./circle-pack-chart"));
48
- exports.CirclePackChart = circle_pack_chart_1.default;
49
- var wordcloud_chart_1 = __importDefault(require("./wordcloud-chart"));
50
- exports.WordCloudChart = wordcloud_chart_1.default;
51
- var alluvial_chart_1 = __importDefault(require("./alluvial-chart"));
52
- exports.AlluvialChart = alluvial_chart_1.default;
53
- var heatmap_chart_1 = __importDefault(require("./heatmap-chart"));
54
- exports.HeatmapChart = heatmap_chart_1.default;
package/line-chart.d.ts DELETED
@@ -1,12 +0,0 @@
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 DELETED
@@ -1,42 +0,0 @@
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 utils_1 = require("./utils");
23
- var LineChart = /** @class */ (function (_super) {
24
- __extends(LineChart, _super);
25
- function LineChart() {
26
- return _super !== null && _super.apply(this, arguments) || this;
27
- }
28
- LineChart.prototype.componentDidMount = function () {
29
- if (utils_1.hasChartBeenInitialized(this.chartRef) === false) {
30
- this.chart = new charts_1.LineChart(this.chartRef, {
31
- data: this.props.data,
32
- options: this.props.options,
33
- });
34
- }
35
- };
36
- LineChart.prototype.render = function () {
37
- var _this = this;
38
- return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
39
- };
40
- return LineChart;
41
- }(base_chart_1.default));
42
- exports.default = LineChart;
@@ -1,12 +0,0 @@
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 {};
package/lollipop-chart.js DELETED
@@ -1,42 +0,0 @@
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 utils_1 = require("./utils");
23
- var LollipopChart = /** @class */ (function (_super) {
24
- __extends(LollipopChart, _super);
25
- function LollipopChart() {
26
- return _super !== null && _super.apply(this, arguments) || this;
27
- }
28
- LollipopChart.prototype.componentDidMount = function () {
29
- if (utils_1.hasChartBeenInitialized(this.chartRef) === false) {
30
- this.chart = new charts_1.LollipopChart(this.chartRef, {
31
- data: this.props.data,
32
- options: this.props.options,
33
- });
34
- }
35
- };
36
- LollipopChart.prototype.render = function () {
37
- var _this = this;
38
- return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
39
- };
40
- return LollipopChart;
41
- }(base_chart_1.default));
42
- exports.default = LollipopChart;
package/meter-chart.d.ts DELETED
@@ -1,12 +0,0 @@
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 DELETED
@@ -1,42 +0,0 @@
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 utils_1 = require("./utils");
23
- var MeterChart = /** @class */ (function (_super) {
24
- __extends(MeterChart, _super);
25
- function MeterChart() {
26
- return _super !== null && _super.apply(this, arguments) || this;
27
- }
28
- MeterChart.prototype.componentDidMount = function () {
29
- if (utils_1.hasChartBeenInitialized(this.chartRef) === false) {
30
- this.chart = new charts_1.MeterChart(this.chartRef, {
31
- data: this.props.data,
32
- options: this.props.options,
33
- });
34
- }
35
- };
36
- MeterChart.prototype.render = function () {
37
- var _this = this;
38
- return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
39
- };
40
- return MeterChart;
41
- }(base_chart_1.default));
42
- exports.default = MeterChart;
package/pie-chart.d.ts DELETED
@@ -1,12 +0,0 @@
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 DELETED
@@ -1,42 +0,0 @@
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 utils_1 = require("./utils");
23
- var PieChart = /** @class */ (function (_super) {
24
- __extends(PieChart, _super);
25
- function PieChart() {
26
- return _super !== null && _super.apply(this, arguments) || this;
27
- }
28
- PieChart.prototype.componentDidMount = function () {
29
- if (utils_1.hasChartBeenInitialized(this.chartRef) === false) {
30
- this.chart = new charts_1.PieChart(this.chartRef, {
31
- data: this.props.data,
32
- options: this.props.options,
33
- });
34
- }
35
- };
36
- PieChart.prototype.render = function () {
37
- var _this = this;
38
- return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
39
- };
40
- return PieChart;
41
- }(base_chart_1.default));
42
- exports.default = PieChart;
package/radar-chart.d.ts DELETED
@@ -1,12 +0,0 @@
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 DELETED
@@ -1,42 +0,0 @@
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 utils_1 = require("./utils");
23
- var RadarChart = /** @class */ (function (_super) {
24
- __extends(RadarChart, _super);
25
- function RadarChart() {
26
- return _super !== null && _super.apply(this, arguments) || this;
27
- }
28
- RadarChart.prototype.componentDidMount = function () {
29
- if (utils_1.hasChartBeenInitialized(this.chartRef) === false) {
30
- this.chart = new charts_1.RadarChart(this.chartRef, {
31
- data: this.props.data,
32
- options: this.props.options,
33
- });
34
- }
35
- };
36
- RadarChart.prototype.render = function () {
37
- var _this = this;
38
- return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
39
- };
40
- return RadarChart;
41
- }(base_chart_1.default));
42
- exports.default = RadarChart;
@@ -1,12 +0,0 @@
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 {};
package/scatter-chart.js DELETED
@@ -1,42 +0,0 @@
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 utils_1 = require("./utils");
23
- var ScatterChart = /** @class */ (function (_super) {
24
- __extends(ScatterChart, _super);
25
- function ScatterChart() {
26
- return _super !== null && _super.apply(this, arguments) || this;
27
- }
28
- ScatterChart.prototype.componentDidMount = function () {
29
- if (utils_1.hasChartBeenInitialized(this.chartRef) === false) {
30
- this.chart = new charts_1.ScatterChart(this.chartRef, {
31
- data: this.props.data,
32
- options: this.props.options,
33
- });
34
- }
35
- };
36
- ScatterChart.prototype.render = function () {
37
- var _this = this;
38
- return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
39
- };
40
- return ScatterChart;
41
- }(base_chart_1.default));
42
- exports.default = ScatterChart;
package/tree-chart.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import { TreeChart as TC } from '@carbon/charts';
2
- import BaseChart from './base-chart';
3
- import { ChartConfig, TreeChartOptions } from '@carbon/charts/interfaces';
4
- declare type TreeChartProps = ChartConfig<TreeChartOptions>;
5
- export default class TreeChart extends BaseChart<TreeChartOptions> {
6
- chartRef: HTMLDivElement;
7
- props: TreeChartProps;
8
- chart: TC;
9
- componentDidMount(): void;
10
- render(): JSX.Element;
11
- }
12
- export {};
package/tree-chart.js DELETED
@@ -1,42 +0,0 @@
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 utils_1 = require("./utils");
23
- var TreeChart = /** @class */ (function (_super) {
24
- __extends(TreeChart, _super);
25
- function TreeChart() {
26
- return _super !== null && _super.apply(this, arguments) || this;
27
- }
28
- TreeChart.prototype.componentDidMount = function () {
29
- if (utils_1.hasChartBeenInitialized(this.chartRef) === false) {
30
- this.chart = new charts_1.TreeChart(this.chartRef, {
31
- data: this.props.data,
32
- options: this.props.options,
33
- });
34
- }
35
- };
36
- TreeChart.prototype.render = function () {
37
- var _this = this;
38
- return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
39
- };
40
- return TreeChart;
41
- }(base_chart_1.default));
42
- exports.default = TreeChart;
@@ -1,12 +0,0 @@
1
- import { TreemapChart as TC } from '@carbon/charts';
2
- import BaseChart from './base-chart';
3
- import { ChartConfig, TreemapChartOptions } from '@carbon/charts/interfaces';
4
- declare type TreemapChartProps = ChartConfig<TreemapChartOptions>;
5
- export default class TreemapChart extends BaseChart<TreemapChartOptions> {
6
- chartRef: HTMLDivElement;
7
- props: TreemapChartProps;
8
- chart: TC;
9
- componentDidMount(): void;
10
- render(): JSX.Element;
11
- }
12
- export {};
package/treemap-chart.js DELETED
@@ -1,42 +0,0 @@
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 utils_1 = require("./utils");
23
- var TreemapChart = /** @class */ (function (_super) {
24
- __extends(TreemapChart, _super);
25
- function TreemapChart() {
26
- return _super !== null && _super.apply(this, arguments) || this;
27
- }
28
- TreemapChart.prototype.componentDidMount = function () {
29
- if (utils_1.hasChartBeenInitialized(this.chartRef) === false) {
30
- this.chart = new charts_1.TreemapChart(this.chartRef, {
31
- data: this.props.data,
32
- options: this.props.options,
33
- });
34
- }
35
- };
36
- TreemapChart.prototype.render = function () {
37
- var _this = this;
38
- return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
39
- };
40
- return TreemapChart;
41
- }(base_chart_1.default));
42
- exports.default = TreemapChart;
package/utils.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const hasChartBeenInitialized: (chartHolder: HTMLElement) => boolean;
package/utils.js DELETED
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hasChartBeenInitialized = void 0;
4
- var carbonPrefix = 'cds';
5
- var chartsPrefix = 'cc';
6
- var hasChartBeenInitialized = function (chartHolder) {
7
- return !!chartHolder.querySelector("div." + carbonPrefix + "--" + chartsPrefix + "--chart-wrapper");
8
- };
9
- exports.hasChartBeenInitialized = hasChartBeenInitialized;
@@ -1,12 +0,0 @@
1
- import { WordCloudChart as WCC } from '@carbon/charts';
2
- import BaseChart from './base-chart';
3
- import { ChartConfig, WorldCloudChartOptions } from '@carbon/charts/interfaces';
4
- declare type WordCloudChartProps = ChartConfig<WorldCloudChartOptions>;
5
- export default class WordCloudChart extends BaseChart<WorldCloudChartOptions> {
6
- chartRef: HTMLDivElement;
7
- props: WordCloudChartProps;
8
- chart: WCC;
9
- componentDidMount(): void;
10
- render(): JSX.Element;
11
- }
12
- export {};
@@ -1,42 +0,0 @@
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 utils_1 = require("./utils");
23
- var WordCloudChart = /** @class */ (function (_super) {
24
- __extends(WordCloudChart, _super);
25
- function WordCloudChart() {
26
- return _super !== null && _super.apply(this, arguments) || this;
27
- }
28
- WordCloudChart.prototype.componentDidMount = function () {
29
- if (utils_1.hasChartBeenInitialized(this.chartRef) === false) {
30
- this.chart = new charts_1.WordCloudChart(this.chartRef, {
31
- data: this.props.data,
32
- options: this.props.options,
33
- });
34
- }
35
- };
36
- WordCloudChart.prototype.render = function () {
37
- var _this = this;
38
- return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
39
- };
40
- return WordCloudChart;
41
- }(base_chart_1.default));
42
- exports.default = WordCloudChart;