@carbon/charts-svelte 0.51.4 → 0.52.3
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/package.json +2 -2
- package/types/AlluvialChart.d.ts +5 -0
- package/types/BaseChart.d.ts +6 -5
- package/types/HistogramChart.d.ts +5 -0
- package/types/TreeChart.d.ts +15 -0
- package/types/index.d.ts +4 -1
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.52.3](https://github.com/carbon-design-system/carbon-charts/compare/v0.52.2...v0.52.3) (2021-11-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts-svelte
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.52.2](https://github.com/carbon-design-system/carbon-charts/compare/v0.52.1...v0.52.2) (2021-11-19)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @carbon/charts-svelte
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.52.1](https://github.com/carbon-design-system/carbon-charts/compare/v0.52.0...v0.52.1) (2021-11-19)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @carbon/charts-svelte
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [0.52.0](https://github.com/carbon-design-system/carbon-charts/compare/v0.51.4...v0.52.0) (2021-11-18)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* **svelte:** add TypeScript definitions for Alluvial, Histogram, and Tree charts ([#1219](https://github.com/carbon-design-system/carbon-charts/issues/1219)) ([3e7fcc2](https://github.com/carbon-design-system/carbon-charts/commit/3e7fcc2f16d16d67c4f39f4d4389878b5d829aba))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
## [0.51.4](https://github.com/carbon-design-system/carbon-charts/compare/v0.51.3...v0.51.4) (2021-11-16)
|
|
7
42
|
|
|
8
43
|
**Note:** Version bump only for package @carbon/charts-svelte
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/charts-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.3",
|
|
4
4
|
"description": "Carbon charting components for Svelte",
|
|
5
5
|
"main": "./bundle.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://github.com/carbon-design-system/carbon-charts#readme",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@carbon/charts": "^0.
|
|
53
|
+
"@carbon/charts": "^0.52.3",
|
|
54
54
|
"@carbon/telemetry": "0.0.0-alpha.6"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
package/types/BaseChart.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
ChartTabularData,
|
|
7
7
|
} from "@carbon/charts/interfaces";
|
|
8
8
|
|
|
9
|
-
export interface BaseChartProps<Chart = BC, ChartOptions = BaseChartOptions>
|
|
9
|
+
export interface BaseChartProps<Chart = BC, ChartOptions = BaseChartOptions, ChartData = ChartTabularData>
|
|
10
10
|
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
|
11
11
|
/**
|
|
12
12
|
* Provide a Carbon chart class to instantiate
|
|
@@ -24,7 +24,7 @@ export interface BaseChartProps<Chart = BC, ChartOptions = BaseChartOptions>
|
|
|
24
24
|
* Set the chart data using the tabular data format
|
|
25
25
|
* @default []
|
|
26
26
|
*/
|
|
27
|
-
data?:
|
|
27
|
+
data?: ChartData;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Set the chart options
|
|
@@ -46,10 +46,11 @@ export interface BaseChartProps<Chart = BC, ChartOptions = BaseChartOptions>
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export default class BaseChart<
|
|
49
|
-
Chart =
|
|
50
|
-
ChartOptions = BaseChartOptions
|
|
49
|
+
Chart = BC,
|
|
50
|
+
ChartOptions = BaseChartOptions,
|
|
51
|
+
ChartData = ChartTabularData
|
|
51
52
|
> extends SvelteComponentTyped<
|
|
52
|
-
BaseChartProps<Chart, ChartOptions>,
|
|
53
|
+
BaseChartProps<Chart, ChartOptions, ChartData>,
|
|
53
54
|
{
|
|
54
55
|
load: CustomEvent<Chart>;
|
|
55
56
|
update: CustomEvent<{
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TreeChart as TC } from '@carbon/charts';
|
|
2
|
+
import type { TreeChartOptions } from '@carbon/charts/interfaces';
|
|
3
|
+
import BaseChart from './BaseChart';
|
|
4
|
+
|
|
5
|
+
interface TreeNode {
|
|
6
|
+
name: string;
|
|
7
|
+
value?: number;
|
|
8
|
+
children?: TreeNode[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default class TreeChart extends BaseChart<
|
|
12
|
+
TC,
|
|
13
|
+
TreeChartOptions,
|
|
14
|
+
TreeNode
|
|
15
|
+
> {}
|
package/types/index.d.ts
CHANGED
|
@@ -17,4 +17,7 @@ export { default as RadarChart } from "./RadarChart";
|
|
|
17
17
|
export { default as GaugeChart } from "./GaugeChart";
|
|
18
18
|
export { default as MeterChart } from "./MeterChart";
|
|
19
19
|
export { default as TreemapChart } from "./TreemapChart";
|
|
20
|
-
export { default as WordCloudChart } from "./WordCloudChart";
|
|
20
|
+
export { default as WordCloudChart } from "./WordCloudChart";
|
|
21
|
+
export { default as AlluvialChart } from "./AlluvialChart";
|
|
22
|
+
export { default as HistogramChart } from "./HistogramChart";
|
|
23
|
+
export { default as TreeChart } from "./TreeChart";
|