@carbon/charts-svelte 1.16.3 → 1.16.5

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 (57) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +3 -3
  3. package/dist/AlluvialChart.svelte +2 -2
  4. package/dist/AlluvialChart.svelte.d.ts +3 -3
  5. package/dist/AreaChart.svelte +2 -2
  6. package/dist/AreaChart.svelte.d.ts +3 -3
  7. package/dist/BarChartGrouped.svelte +2 -2
  8. package/dist/BarChartGrouped.svelte.d.ts +3 -3
  9. package/dist/BarChartSimple.svelte +2 -2
  10. package/dist/BarChartSimple.svelte.d.ts +3 -3
  11. package/dist/BarChartStacked.svelte +2 -2
  12. package/dist/BarChartStacked.svelte.d.ts +3 -3
  13. package/dist/BaseChart.svelte +5 -5
  14. package/dist/BaseChart.svelte.d.ts +15 -18
  15. package/dist/BoxplotChart.svelte +2 -2
  16. package/dist/BoxplotChart.svelte.d.ts +3 -3
  17. package/dist/BubbleChart.svelte +2 -2
  18. package/dist/BubbleChart.svelte.d.ts +3 -3
  19. package/dist/BulletChart.svelte +2 -2
  20. package/dist/BulletChart.svelte.d.ts +3 -3
  21. package/dist/ChoroplethChart.svelte +3 -3
  22. package/dist/ChoroplethChart.svelte.d.ts +4 -4
  23. package/dist/CirclePackChart.svelte +2 -2
  24. package/dist/CirclePackChart.svelte.d.ts +3 -3
  25. package/dist/ComboChart.svelte +2 -2
  26. package/dist/ComboChart.svelte.d.ts +3 -3
  27. package/dist/DonutChart.svelte +2 -2
  28. package/dist/DonutChart.svelte.d.ts +3 -3
  29. package/dist/GaugeChart.svelte +2 -2
  30. package/dist/GaugeChart.svelte.d.ts +3 -3
  31. package/dist/HeatmapChart.svelte +2 -2
  32. package/dist/HeatmapChart.svelte.d.ts +3 -3
  33. package/dist/HistogramChart.svelte +2 -2
  34. package/dist/HistogramChart.svelte.d.ts +3 -3
  35. package/dist/LineChart.svelte +2 -2
  36. package/dist/LineChart.svelte.d.ts +3 -3
  37. package/dist/LollipopChart.svelte +2 -2
  38. package/dist/LollipopChart.svelte.d.ts +3 -3
  39. package/dist/MeterChart.svelte +2 -2
  40. package/dist/MeterChart.svelte.d.ts +3 -3
  41. package/dist/PieChart.svelte +2 -2
  42. package/dist/PieChart.svelte.d.ts +3 -3
  43. package/dist/RadarChart.svelte +2 -2
  44. package/dist/RadarChart.svelte.d.ts +3 -3
  45. package/dist/ScatterChart.svelte +2 -2
  46. package/dist/ScatterChart.svelte.d.ts +3 -3
  47. package/dist/StackedAreaChart.svelte +2 -2
  48. package/dist/StackedAreaChart.svelte.d.ts +3 -3
  49. package/dist/TreeChart.svelte +2 -2
  50. package/dist/TreeChart.svelte.d.ts +3 -3
  51. package/dist/TreemapChart.svelte +2 -2
  52. package/dist/TreemapChart.svelte.d.ts +3 -3
  53. package/dist/WordCloudChart.svelte +2 -2
  54. package/dist/WordCloudChart.svelte.d.ts +5 -5
  55. package/dist/index.d.ts +12 -4
  56. package/dist/index.js +8 -4
  57. package/package.json +11 -14
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 1.16.5 (2024-06-15)
7
+
8
+ **Note:** Version bump only for package @carbon/charts-svelte
9
+
10
+ # Change Log
11
+
12
+ All notable changes to this project will be documented in this file. See
13
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
14
+
15
+ ## 1.16.4 (2024-06-12)
16
+
17
+ ### Bug Fixes
18
+
19
+ - **wordcloud,choropleth:** provide corrected names, deprecate old names
20
+ ([#1832](https://github.com/carbon-design-system/carbon-charts/issues/1832))
21
+ ([230ce7c](https://github.com/carbon-design-system/carbon-charts/commit/230ce7c3bdce8e03e70b8188e06a1d65ee90b2be))
22
+
23
+ # Change Log
24
+
25
+ All notable changes to this project will be documented in this file. See
26
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
27
+
6
28
  ## 1.16.3 (2024-06-03)
7
29
 
8
30
  **Note:** Version bump only for package @carbon/charts-svelte
package/README.md CHANGED
@@ -20,13 +20,13 @@ Please direct all questions regarding support, bug fixes and feature requests to
20
20
  Run the following command using [npm](https://www.npmjs.com/):
21
21
 
22
22
  ```bash
23
- npm install -D @carbon/charts-svelte d3 d3-cloud d3-sankey
23
+ npm install -D @carbon/charts-svelte
24
24
  ```
25
25
 
26
26
  If you prefer [Yarn](https://yarnpkg.com/en/), use the following command instead:
27
27
 
28
28
  ```bash
29
- yarn add -D @carbon/charts-svelte d3 d3-cloud d3-sankey
29
+ yarn add -D @carbon/charts-svelte
30
30
  ```
31
31
 
32
32
  ### SvelteKit
@@ -58,7 +58,7 @@ You may see circular dependency warnings for `d3` packages. These can be safely
58
58
 
59
59
  ## Usage
60
60
 
61
- Styles must be imported from `@carbon/charts-svelte/styles.css`.
61
+ Styles must be imported from `@carbon/charts-svelte/styles.css` or `@carbon/charts-svelte/scss`.
62
62
 
63
63
  ```js
64
64
  import '@carbon/charts-svelte/styles.css'
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: AlluvialChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: AlluvialChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: AlluvialChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: AreaChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: AreaChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: AreaChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: BarChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: GroupedBarChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: GroupedBarChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: BarChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: SimpleBarChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: SimpleBarChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: BarChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: StackedBarChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: StackedBarChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -1,10 +1,10 @@
1
- <script>import { onMount, afterUpdate, onDestroy, createEventDispatcher } from "svelte";
1
+ <script generics="T extends BaseChartOptions">import { onMount, afterUpdate, onDestroy, createEventDispatcher } from "svelte";
2
2
  const chartHolderCssClass = "cds--chart-holder";
3
3
  export let data = [];
4
4
  export let options = {};
5
- export let Chart = void 0;
6
- export let chart = null;
7
- export let ref = null;
5
+ export let Chart;
6
+ export let chart;
7
+ export let ref;
8
8
  export let id = `chart-${Math.random().toString(36)}`;
9
9
  const dispatch = createEventDispatcher();
10
10
  onMount(() => {
@@ -31,7 +31,7 @@ onDestroy(() => {
31
31
  dispatch("destroy");
32
32
  chart.components.forEach((component) => component.destroy());
33
33
  chart.model.set({ destroyed: true }, { skipUpdate: true });
34
- chart = null;
34
+ chart = void 0;
35
35
  }
36
36
  });
37
37
  </script>
@@ -1,33 +1,30 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { Charts, ChartOptions, ChartTabularData } from '@carbon/charts';
3
- declare const __propDef: {
4
- props: {
2
+ import type { Charts, ChartConfig, BaseChartOptions, ChartTabularData } from '@carbon/charts';
3
+ declare class __sveltets_Render<T extends BaseChartOptions> {
4
+ props(): {
5
5
  [x: string]: any;
6
6
  data?: ChartTabularData;
7
- options?: ChartOptions;
8
- Chart?: new (ref: HTMLDivElement, { options, data }: {
9
- options: ChartOptions;
10
- data: ChartTabularData;
11
- }) => Charts | undefined;
12
- chart?: Charts | null;
13
- ref?: HTMLDivElement | null;
7
+ options?: T;
8
+ Chart: new (holder: HTMLDivElement, chartConfigs: ChartConfig<T>) => Charts;
9
+ chart: Charts;
10
+ ref: HTMLDivElement;
14
11
  id?: string;
15
12
  };
16
- events: {
13
+ events(): {
17
14
  load: CustomEvent<null>;
18
15
  update: CustomEvent<{
19
16
  data: ChartTabularData;
20
- options: ChartOptions;
17
+ options: T;
21
18
  }>;
22
19
  destroy: CustomEvent<null>;
23
20
  } & {
24
21
  [evt: string]: CustomEvent<any>;
25
22
  };
26
- slots: {};
27
- };
28
- export type BaseChartProps = typeof __propDef.props;
29
- export type BaseChartEvents = typeof __propDef.events;
30
- export type BaseChartSlots = typeof __propDef.slots;
31
- export default class BaseChart extends SvelteComponentTyped<BaseChartProps, BaseChartEvents, BaseChartSlots> {
23
+ slots(): {};
24
+ }
25
+ export type BaseChartProps<T extends BaseChartOptions> = ReturnType<__sveltets_Render<T>['props']>;
26
+ export type BaseChartEvents<T extends BaseChartOptions> = ReturnType<__sveltets_Render<T>['events']>;
27
+ export type BaseChartSlots<T extends BaseChartOptions> = ReturnType<__sveltets_Render<T>['slots']>;
28
+ export default class BaseChart<T extends BaseChartOptions> extends SvelteComponentTyped<BaseChartProps<T>, BaseChartEvents<T>, BaseChartSlots<T>> {
32
29
  }
33
30
  export {};
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: BoxplotChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: BoxplotChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: BoxplotChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: BubbleChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: BubbleChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: BubbleChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: BulletChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: BulletChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: BulletChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -1,11 +1,11 @@
1
1
  <script>import {
2
- ExperimentalChoroplethChart as ChoroplethChartCore
2
+ ChoroplethChart as ChoroplethChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -1,18 +1,18 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import { ExperimentalChoroplethChart as ChoroplethChartCore, type ChoroplethChartOptions, type ChartTabularData } from '@carbon/charts';
2
+ import { ChoroplethChart as ChoroplethChartCore, type ChoroplethChartOptions, type ChartTabularData } from '@carbon/charts';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
6
  options: ChoroplethChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: ChoroplethChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: ChoroplethChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: CirclePackChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: CirclePackChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: CirclePackChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: ComboChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: ComboChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: ComboChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: DonutChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: DonutChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: DonutChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: GaugeChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: GaugeChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: GaugeChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: HeatmapChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: HeatmapChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: HeatmapChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: HistogramChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: HistogramChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: HistogramChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: LineChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: LineChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: LineChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: LollipopChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: LollipopChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: LollipopChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: MeterChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: MeterChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: MeterChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: PieChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: PieChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: PieChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: RadarChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: RadarChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: RadarChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: ScatterChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: ScatterChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: ScatterChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: StackedAreaChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: StackedAreaChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: StackedAreaChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: TreeChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: TreeChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: TreeChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -5,14 +5,14 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  options: TreemapChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: TreemapChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: TreemapChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
@@ -4,8 +4,8 @@
4
4
  import BaseChart from "./BaseChart.svelte";
5
5
  export let options;
6
6
  export let data;
7
- export let chart = null;
8
- export let ref = null;
7
+ export let chart;
8
+ export let ref;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -1,18 +1,18 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import { WordCloudChart as WordCloudChartCore, type WorldCloudChartOptions, type ChartTabularData } from '@carbon/charts';
2
+ import { WordCloudChart as WordCloudChartCore, type WordCloudChartOptions, type WorldCloudChartOptions, type ChartTabularData } from '@carbon/charts';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- options: WorldCloudChartOptions;
6
+ options: WordCloudChartOptions | WorldCloudChartOptions;
7
7
  data: ChartTabularData;
8
- chart?: WordCloudChartCore | null;
9
- ref?: HTMLDivElement | null;
8
+ chart: WordCloudChartCore;
9
+ ref: HTMLDivElement;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<null>;
13
13
  update: CustomEvent<{
14
14
  data: ChartTabularData;
15
- options: import("@carbon/charts").ChartOptions;
15
+ options: import("@carbon/charts").BaseChartOptions;
16
16
  }>;
17
17
  destroy: CustomEvent<null>;
18
18
  } & {
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import BarChartStacked from './BarChartStacked.svelte';
6
6
  import BoxplotChart from './BoxplotChart.svelte';
7
7
  import BubbleChart from './BubbleChart.svelte';
8
8
  import BulletChart from './BulletChart.svelte';
9
- import ExperimentalChoroplethChart from './ChoroplethChart.svelte';
9
+ import ChoroplethChart from './ChoroplethChart.svelte';
10
10
  import CirclePackChart from './CirclePackChart.svelte';
11
11
  import ComboChart from './ComboChart.svelte';
12
12
  import DonutChart from './DonutChart.svelte';
@@ -23,6 +23,14 @@ import StackedAreaChart from './StackedAreaChart.svelte';
23
23
  import TreeChart from './TreeChart.svelte';
24
24
  import TreemapChart from './TreemapChart.svelte';
25
25
  import WordCloudChart from './WordCloudChart.svelte';
26
- export type { ChartTabularData, ChartOptions, AlluvialChartOptions, AreaChartOptions, BarChartOptions, BoxplotChartOptions, BubbleChartOptions, BulletChartOptions, ChoroplethChartOptions, CirclePackChartOptions, ComboChartOptions, DonutChartOptions, GaugeChartOptions, HeatmapChartOptions, HistogramChartOptions, LineChartOptions, LollipopChartOptions, MeterChartOptions, PieChartOptions, RadarChartOptions, ScatterChartOptions, StackedAreaChartOptions, TreeChartOptions, TreemapChartOptions, WorldCloudChartOptions } from '@carbon/charts';
27
- export { Alignments, ChartTheme, ScaleTypes } from '@carbon/charts';
28
- export { AlluvialChart, AreaChart, BarChartGrouped, BarChartSimple, BarChartStacked, BoxplotChart, BubbleChart, BulletChart, ExperimentalChoroplethChart, CirclePackChart, ComboChart, DonutChart, GaugeChart, HeatmapChart, HistogramChart, LineChart, LollipopChart, MeterChart, PieChart, RadarChart, ScatterChart, StackedAreaChart, TreeChart, TreemapChart, WordCloudChart };
26
+ export type { ChartTabularData, ChartOptions, AlluvialChartOptions, AreaChartOptions, BarChartOptions, BoxplotChartOptions, BubbleChartOptions, BulletChartOptions, ChoroplethChartOptions, CirclePackChartOptions, ComboChartOptions, DonutChartOptions, GaugeChartOptions, HeatmapChartOptions, HistogramChartOptions, LineChartOptions, LollipopChartOptions, MeterChartOptions, PieChartOptions, RadarChartOptions, ScatterChartOptions, StackedAreaChartOptions, TreeChartOptions, TreemapChartOptions, WordCloudChartOptions,
27
+ /**
28
+ * @deprecated Use `WordCloudChartOptions` instead.
29
+ */
30
+ WorldCloudChartOptions } from '@carbon/charts';
31
+ export { AlluvialChart, AreaChart, BarChartGrouped, BarChartSimple, BarChartStacked, BoxplotChart, BubbleChart, BulletChart, ChoroplethChart,
32
+ /**
33
+ * @deprecated Use `ChoroplethChart` instead.
34
+ */
35
+ ChoroplethChart as ExperimentalChoroplethChart, CirclePackChart, ComboChart, DonutChart, GaugeChart, HeatmapChart, HistogramChart, LineChart, LollipopChart, MeterChart, PieChart, RadarChart, ScatterChart, StackedAreaChart, TreeChart, TreemapChart, WordCloudChart };
36
+ export { Alignments, AreaEvent, ArrowDirections, AxisEvent, AxisFlavor, AxisPositions, AxisTitleOrientations, BarEvent, BoxplotEvent, CalloutDirections, CanvasZoomEvent, CartesianOrientations, ChartEvent, ChartTheme, ChartTypes, ColorClassNameTypes, ColorLegendType, DividerStatus, DominantBaseline, GaugeEvent, GaugeTypes, LayoutAlignItems, LayoutDirection, LayoutGrowth, LegendItemType, LegendOrientations, LegendPositions, LineEvent, ModalEvent, ModelEvent, PieEvent, Projection, RadarEvent, RenderTypes, ScaleTypes, ScatterEvent, Skeletons, Statuses, TextAnchor, ThresholdEvent, TickRotations, ToolbarControlTypes, TooltipEvent, TruncationTypes, TreeEvent, TreemapEvent, TreeTypes, WordCloudEvent, ZoombarEvent, ZoomDomainEvent, ZoomBarTypes } from '@carbon/charts';
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import BarChartStacked from './BarChartStacked.svelte';
6
6
  import BoxplotChart from './BoxplotChart.svelte';
7
7
  import BubbleChart from './BubbleChart.svelte';
8
8
  import BulletChart from './BulletChart.svelte';
9
- import ExperimentalChoroplethChart from './ChoroplethChart.svelte';
9
+ import ChoroplethChart from './ChoroplethChart.svelte';
10
10
  import CirclePackChart from './CirclePackChart.svelte';
11
11
  import ComboChart from './ComboChart.svelte';
12
12
  import DonutChart from './DonutChart.svelte';
@@ -23,6 +23,10 @@ import StackedAreaChart from './StackedAreaChart.svelte';
23
23
  import TreeChart from './TreeChart.svelte';
24
24
  import TreemapChart from './TreemapChart.svelte';
25
25
  import WordCloudChart from './WordCloudChart.svelte';
26
- // Commonly-used enums
27
- export { Alignments, ChartTheme, ScaleTypes } from '@carbon/charts';
28
- export { AlluvialChart, AreaChart, BarChartGrouped, BarChartSimple, BarChartStacked, BoxplotChart, BubbleChart, BulletChart, ExperimentalChoroplethChart, CirclePackChart, ComboChart, DonutChart, GaugeChart, HeatmapChart, HistogramChart, LineChart, LollipopChart, MeterChart, PieChart, RadarChart, ScatterChart, StackedAreaChart, TreeChart, TreemapChart, WordCloudChart };
26
+ export { AlluvialChart, AreaChart, BarChartGrouped, BarChartSimple, BarChartStacked, BoxplotChart, BubbleChart, BulletChart, ChoroplethChart,
27
+ /**
28
+ * @deprecated Use `ChoroplethChart` instead.
29
+ */
30
+ ChoroplethChart as ExperimentalChoroplethChart, CirclePackChart, ComboChart, DonutChart, GaugeChart, HeatmapChart, HistogramChart, LineChart, LollipopChart, MeterChart, PieChart, RadarChart, ScatterChart, StackedAreaChart, TreeChart, TreemapChart, WordCloudChart };
31
+ // All enums
32
+ export { Alignments, AreaEvent, ArrowDirections, AxisEvent, AxisFlavor, AxisPositions, AxisTitleOrientations, BarEvent, BoxplotEvent, CalloutDirections, CanvasZoomEvent, CartesianOrientations, ChartEvent, ChartTheme, ChartTypes, ColorClassNameTypes, ColorLegendType, DividerStatus, DominantBaseline, GaugeEvent, GaugeTypes, LayoutAlignItems, LayoutDirection, LayoutGrowth, LegendItemType, LegendOrientations, LegendPositions, LineEvent, ModalEvent, ModelEvent, PieEvent, Projection, RadarEvent, RenderTypes, ScaleTypes, ScatterEvent, Skeletons, Statuses, TextAnchor, ThresholdEvent, TickRotations, ToolbarControlTypes, TooltipEvent, TruncationTypes, TreeEvent, TreemapEvent, TreeTypes, WordCloudEvent, ZoombarEvent, ZoomDomainEvent, ZoomBarTypes } from '@carbon/charts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon/charts-svelte",
3
- "version": "1.16.3",
3
+ "version": "1.16.5",
4
4
  "description": "Carbon Charts component library for Svelte",
5
5
  "scripts": {
6
6
  "postinstall": "ibmtelemetry --config=telemetry.yml",
@@ -43,28 +43,25 @@
43
43
  "svelte": "^3.31.0 || ^4.0.0"
44
44
  },
45
45
  "dependencies": {
46
- "@carbon/charts": "1.16.3",
46
+ "@carbon/charts": "1.16.5",
47
47
  "@ibm/telemetry-js": "^1.5.2"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@stackblitz/sdk": "^1.10.0",
51
- "@sveltejs/adapter-auto": "^3.2.1",
52
- "@sveltejs/kit": "^2.5.10",
53
- "@sveltejs/package": "^2.3.1",
51
+ "@sveltejs/adapter-auto": "^3.2.2",
52
+ "@sveltejs/kit": "^2.5.15",
53
+ "@sveltejs/package": "^2.3.2",
54
54
  "@sveltejs/vite-plugin-svelte": "^3.1.1",
55
55
  "concurrently": "^8.2.2",
56
- "d3": "^7.9.0",
57
- "d3-cloud": "^1.2.7",
58
- "d3-sankey": "^0.12.3",
59
- "eslint": "^9.4.0",
60
- "prettier": "^3.3.0",
56
+ "eslint": "^9.5.0",
57
+ "prettier": "^3.3.2",
61
58
  "publint": "^0.2.8",
62
59
  "storybook": "^7.6.19",
63
- "svelte": "^4.2.17",
60
+ "svelte": "^4.2.18",
64
61
  "svelte-check": "^3.8.0",
65
- "tslib": "^2.6.2",
62
+ "tslib": "^2.6.3",
66
63
  "typescript": "^5.4.5",
67
- "vite": "^5.2.12"
64
+ "vite": "^5.3.1"
68
65
  },
69
66
  "publishConfig": {
70
67
  "access": "public"
@@ -121,5 +118,5 @@
121
118
  "data",
122
119
  "typescript"
123
120
  ],
124
- "gitHead": "ca97715d352a589fb69e788174fac7313f8b2426"
121
+ "gitHead": "489b0a3edf8e3fefdc4f733390e2fae199b41caa"
125
122
  }