@carbon/charts-svelte 1.11.8 → 1.11.10

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 (53) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +28 -90
  3. package/dist/AlluvialChart.svelte +2 -2
  4. package/dist/AlluvialChart.svelte.d.ts +2 -2
  5. package/dist/AreaChart.svelte +2 -2
  6. package/dist/AreaChart.svelte.d.ts +2 -2
  7. package/dist/BarChartGrouped.svelte +2 -2
  8. package/dist/BarChartGrouped.svelte.d.ts +2 -2
  9. package/dist/BarChartSimple.svelte +2 -2
  10. package/dist/BarChartSimple.svelte.d.ts +2 -2
  11. package/dist/BarChartStacked.svelte +2 -2
  12. package/dist/BarChartStacked.svelte.d.ts +2 -2
  13. package/dist/BoxplotChart.svelte +2 -2
  14. package/dist/BoxplotChart.svelte.d.ts +2 -2
  15. package/dist/BubbleChart.svelte +2 -2
  16. package/dist/BubbleChart.svelte.d.ts +2 -2
  17. package/dist/BulletChart.svelte +2 -2
  18. package/dist/BulletChart.svelte.d.ts +2 -2
  19. package/dist/ChoroplethChart.svelte +2 -2
  20. package/dist/ChoroplethChart.svelte.d.ts +2 -2
  21. package/dist/CirclePackChart.svelte +2 -2
  22. package/dist/CirclePackChart.svelte.d.ts +2 -2
  23. package/dist/ComboChart.svelte +2 -2
  24. package/dist/ComboChart.svelte.d.ts +2 -2
  25. package/dist/DonutChart.svelte +2 -2
  26. package/dist/DonutChart.svelte.d.ts +2 -2
  27. package/dist/GaugeChart.svelte +2 -2
  28. package/dist/GaugeChart.svelte.d.ts +2 -2
  29. package/dist/HeatmapChart.svelte +2 -2
  30. package/dist/HeatmapChart.svelte.d.ts +2 -2
  31. package/dist/HistogramChart.svelte +2 -2
  32. package/dist/HistogramChart.svelte.d.ts +2 -2
  33. package/dist/LineChart.svelte +2 -2
  34. package/dist/LineChart.svelte.d.ts +2 -2
  35. package/dist/LollipopChart.svelte +2 -2
  36. package/dist/LollipopChart.svelte.d.ts +2 -2
  37. package/dist/MeterChart.svelte +2 -2
  38. package/dist/MeterChart.svelte.d.ts +2 -2
  39. package/dist/PieChart.svelte +2 -2
  40. package/dist/PieChart.svelte.d.ts +2 -2
  41. package/dist/RadarChart.svelte +2 -2
  42. package/dist/RadarChart.svelte.d.ts +2 -2
  43. package/dist/ScatterChart.svelte +2 -2
  44. package/dist/ScatterChart.svelte.d.ts +2 -2
  45. package/dist/StackedAreaChart.svelte +2 -2
  46. package/dist/StackedAreaChart.svelte.d.ts +2 -2
  47. package/dist/TreeChart.svelte +2 -2
  48. package/dist/TreeChart.svelte.d.ts +2 -2
  49. package/dist/TreemapChart.svelte +2 -2
  50. package/dist/TreemapChart.svelte.d.ts +2 -2
  51. package/dist/WordCloudChart.svelte +2 -2
  52. package/dist/WordCloudChart.svelte.d.ts +2 -2
  53. package/package.json +21 -19
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
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
+ ## [1.11.10](https://github.com/carbon-design-system/carbon-charts/compare/v1.11.9...v1.11.10) (2023-07-14)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **prettier:** downgrade for now ([#1621](https://github.com/carbon-design-system/carbon-charts/issues/1621)) ([22509a2](https://github.com/carbon-design-system/carbon-charts/commit/22509a29e15d5aff951db66607965b9e59f898df))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.11.9](https://github.com/carbon-design-system/carbon-charts/compare/v1.11.8...v1.11.9) (2023-07-13)
18
+
19
+ **Note:** Version bump only for package @carbon/charts-svelte
20
+
21
+
22
+
23
+
24
+
6
25
  ## [1.11.8](https://github.com/carbon-design-system/carbon-charts/compare/v1.11.7...v1.11.8) (2023-07-07)
7
26
 
8
27
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Carbon Charts Svelte
2
2
 
3
- Carbon Charts Svelte is a thin Svelte wrapper around the vanilla JavScript `@carbon/charts` component library. The charts are based on D3.js, a peer dependency. Documentation is provided below and in the Storybook demos.
3
+ Carbon Charts Svelte is a thin Svelte wrapper around the vanilla JavaScript `@carbon/charts` component library. The charts are based on D3.js, a peer dependency. Documentation is provided below and in the Storybook demos.
4
4
 
5
5
  **[Storybook demos](https://carbon-design-system.github.io/carbon-charts/svelte)**
6
6
 
@@ -10,7 +10,7 @@ Carbon Charts Svelte is a thin Svelte wrapper around the vanilla JavScript `@car
10
10
 
11
11
  These Svelte wrappers were developed by Eric Liu.
12
12
 
13
- Please direct all questions regarding support, bug fixes, and feature requests to [@metonym](https://github.com/metonym).
13
+ Please direct all questions regarding support, bug fixes and feature requests to [@metonym](https://github.com/metonym).
14
14
 
15
15
  ## Getting started
16
16
 
@@ -26,51 +26,22 @@ If you prefer [Yarn](https://yarnpkg.com/en/), use the following command instead
26
26
  yarn add -D @carbon/charts-svelte @carbon/styles d3 d3-cloud d3-sankey
27
27
  ```
28
28
 
29
- ## Setup
30
-
31
- This is an overview of using Carbon Charts with common Svelte setups.
32
-
33
- - [SvelteKit](#sveltekit)
34
- - [Vite](#vite)
35
-
36
29
  ### SvelteKit
37
30
 
38
- [SvelteKit](https://github.com/sveltejs/kit) is the official framework for building apps that
39
- support client-side rendering (CSR) and server-side rendering (SSR). SvelteKit is powered by
40
- [Vite](https://github.com/vitest-dev/vitest).
31
+ While this component library can be used with any build environments for Svelte, [SvelteKit](https://kit.svelte.dev) is the official framework for building Svelte apps supporting client-side and server-side rendering (SSR). SvelteKit is powered by
32
+ [Vite](https://vitejs.dev).
41
33
 
42
- Modules `@carbon/charts` and `carbon-components` should not be externalized for SSR when building for production.
34
+ The module `@carbon/charts` should not be externalized for SSR when building for production.
43
35
 
44
36
  ```js
45
- // vite.config.js
37
+ // vite.config.mjs
46
38
  import { sveltekit } from '@sveltejs/kit/vite'
47
39
 
48
40
  /** @type {import('vite').UserConfig} */
49
41
  const config = {
50
42
  plugins: [sveltekit()],
51
43
  ssr: {
52
- noExternal: process.env.NODE_ENV === 'production' ? ['@carbon/charts', 'carbon-components'] : []
53
- }
54
- }
55
-
56
- export default config
57
- ```
58
-
59
- ### Vite
60
-
61
- You can also use Vite without SvelteKit. Instruct `vite` to optimize `@carbon/charts` in
62
- `vite.config.js`.
63
-
64
- ```js
65
- // vite.config.js
66
- import { svelte } from '@sveltejs/vite-plugin-svelte'
67
-
68
- /** @type {import('vite').UserConfig} */
69
- const config = {
70
- plugins: [svelte()],
71
- optimizeDeps: {
72
- include: ['@carbon/charts', 'carbon-components'],
73
- exclude: ['@carbon/telemetry']
44
+ noExternal: process.env.NODE_ENV === 'production' ? ['@carbon/charts'] : []
74
45
  }
75
46
  }
76
47
 
@@ -79,31 +50,11 @@ export default config
79
50
 
80
51
  #### Circular dependency warnings
81
52
 
82
- You may see circular dependency warnings for `d3` and `@carbon/charts` packages that can be safely ignored.
83
-
84
- Use the `onwarn` option to selectively ignore these warnings.
85
-
86
- ```js
87
- // rollup.config.js
88
- export default {
89
- onwarn: (warning, warn) => {
90
- // omit circular dependency warnings emitted from
91
- // "d3-*" packages and "@carbon/charts"
92
- if (warning.code === 'CIRCULAR_DEPENDENCY') {
93
- if (warning.ids.some((id) => /node_modules\/(d3-|@carbon\/charts)/.test(id))) {
94
- return
95
- }
96
- }
97
-
98
- // preserve all other warnings
99
- warn(warning)
100
- }
101
- }
102
- ```
53
+ You may see circular dependency warnings for `d3` packages. These can be safely ignored.
103
54
 
104
55
  ## Usage
105
56
 
106
- Styles must be imported from both `@carbon/charts-svelte` and `@carbon/styles`.
57
+ Styles must be imported from both `@carbon/charts-svelte` and `@carbon/styles`. The latter is only required if you use the toolbar.
107
58
 
108
59
  ```js
109
60
  import '@carbon/styles/css/styles.css'
@@ -128,6 +79,7 @@ import '@carbon/charts-svelte/styles.css'
128
79
  { group: 'Misc', value: 16932 }
129
80
  ]}
130
81
  options={{
82
+ theme: 'g90',
131
83
  title: 'Simple bar (discrete)',
132
84
  height: '400px',
133
85
  axes: {
@@ -140,24 +92,7 @@ import '@carbon/charts-svelte/styles.css'
140
92
  ### Theming
141
93
 
142
94
  `@carbon/styles` uses
143
- [CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) for dynamic, client-side theming. Update the Carbon theme using the `theme` prop.
144
-
145
- Supported themes include:
146
-
147
- - `"white"`
148
- - `"g10"` (Gray 10)
149
- - `"g90"` (Gray 90)
150
- - `"g100"` (Gray 100)
151
-
152
- The default theme is `"white"`.
153
-
154
- ```svelte
155
- <BarChartSimple
156
- theme="g90"
157
- data={/* ... */}
158
- options={/* ... */}
159
- />
160
- ```
95
+ [CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) for dynamic, client-side theming. Care should be exercised as the styles apply to the HTML body.
161
96
 
162
97
  ### Dispatched events
163
98
 
@@ -174,7 +109,8 @@ Each Svelte chart component dispatches the following events:
174
109
  ### Dynamic import
175
110
 
176
111
  Dynamically import a chart and instantiate it using the
177
- [svelte:component API](https://svelte.dev/docs#svelte_component).
112
+ [svelte:component API](https://svelte.dev/docs/special-elements#svelte-component). By importing `@carbon/charts` within `onMount()`, you avoid problems with
113
+ server-side rendering.
178
114
 
179
115
  ```svelte
180
116
  <script>
@@ -200,6 +136,7 @@ Dynamically import a chart and instantiate it using the
200
136
  { group: 'Misc', value: 16932 }
201
137
  ]}
202
138
  options={{
139
+ theme: 'white',
203
140
  title: 'Simple bar (discrete)',
204
141
  height: '400px',
205
142
  axes: {
@@ -217,7 +154,7 @@ In this example, an event listener is attached to the `BarChartSimple` component
217
154
  <script>
218
155
  import '@carbon/styles/css/styles.css'
219
156
  import '@carbon/charts-svelte/styles.css'
220
- import { onMount } from 'svelte'
157
+ import { onDestroy, onMount } from 'svelte'
221
158
  import { BarChartSimple } from '@carbon/charts-svelte'
222
159
 
223
160
  let chart
@@ -227,8 +164,12 @@ In this example, an event listener is attached to the `BarChartSimple` component
227
164
  }
228
165
 
229
166
  onMount(() => {
230
- return () => {
231
- if (chart) chart.services.events.removeEventListener('bar-mouseover', barMouseOver)
167
+ // do something
168
+ })
169
+
170
+ onDestroy(() => {
171
+ if (chart) {
172
+ chart.services.events.removeEventListener('bar-mouseover', barMouseOver)
232
173
  }
233
174
  })
234
175
 
@@ -254,26 +195,23 @@ In this example, an event listener is attached to the `BarChartSimple` component
254
195
  }} />
255
196
  ```
256
197
 
257
- ## CodeSandbox examples
198
+ ## StackBlitz examples
258
199
 
259
200
  [Sample use cases can be seen here](https://carbon-design-system.github.io/carbon-charts/svelte).
260
201
 
261
- **When opening the link above**, click on the **Edit on Codesandbox** button for each demo to see an isolated project showing you how to reproduce the demo.
202
+ **When opening the link above**, click on the **Edit on StackBlitz** button for each demo to see an isolated project showing you how to reproduce the demo.
262
203
 
263
204
  ## Charting data & options
264
205
 
265
- Although we will definitely introduce new models in the future as we start shipping new components such as maps, Data and options follow the same model in all charts, with minor exceptions and differences in specific components.
266
-
267
- For instance, in the case of a donut chart, you're able to pass in an additional field called `center` in your options configuring the donut center.
206
+ Although new charts will be introduced in the future (such as a choropleth), data and options follow the same model for all charts with minor exceptions. For example, in the case of a donut chart, you're able to pass in an additional field called `center` in your options to configure the donut center.
268
207
 
269
- For instructions on using the **tabular data format**, see
270
- [here](https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format)
208
+ [Instructions for using the **tabular data format**](https://charts.carbondesignsystem.com/svelte/?path=/docs/docs-tutorials-tabular-data-format--docs)
271
209
 
272
- There are additional options available depending on the chart type being used, [see our demo examples here](https://github.com/carbon-design-system/carbon-charts/tree/master/packages/core/demo/data).
210
+ Additional options are available depending on the chart type being used, [see our demo examples here](https://github.com/carbon-design-system/carbon-charts/tree/master/packages/core/src/demo/charts).
273
211
 
274
212
  Customizable options (specific to chart type) can be found
275
- [here](https://carbon-design-system.github.io/carbon-charts/documentation/modules/_interfaces_charts_.html)
213
+ [here](https://charts.carbondesignsystem.com/documentation/modules/interfaces.html)
276
214
 
277
215
  ## TypeScript support
278
216
 
279
- Svelte version 3.31 or greater is required to use this library with TypeScript.
217
+ Svelte version 3.31 or greater is required to use this library with TypeScript. Svelte 4.x+ is recommended.
@@ -2,10 +2,10 @@
2
2
  AlluvialChart as AlluvialChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { AlluvialChart as AlluvialChartCore, type AlluvialChartOptions, type Cha
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: AlluvialChartCore;
7
6
  options: AlluvialChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: AlluvialChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  AreaChart as AreaChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { AreaChart as AreaChartCore, type AreaChartOptions, type ChartTabularDat
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: AreaChartCore;
7
6
  options: AreaChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: AreaChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  GroupedBarChart as GroupedBarChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { GroupedBarChart as GroupedBarChartCore, type BarChartOptions, type Char
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: GroupedBarChartCore;
7
6
  options: BarChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: GroupedBarChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  SimpleBarChart as SimpleBarChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { SimpleBarChart as SimpleBarChartCore, type BarChartOptions, type ChartT
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: SimpleBarChartCore;
7
6
  options: BarChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: SimpleBarChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  StackedBarChart as StackedBarChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { StackedBarChart as StackedBarChartCore, type BarChartOptions, type Char
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: StackedBarChartCore;
7
6
  options: BarChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: StackedBarChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  BoxplotChart as BoxplotChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { BoxplotChart as BoxplotChartCore, type BoxplotChartOptions, type ChartT
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: BoxplotChartCore;
7
6
  options: BoxplotChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: BoxplotChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  BubbleChart as BubbleChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { BubbleChart as BubbleChartCore, type BubbleChartOptions, type ChartTabu
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: BubbleChartCore;
7
6
  options: BubbleChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: BubbleChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  BulletChart as BulletChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { BulletChart as BulletChartCore, type BulletChartOptions, type ChartTabu
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: BulletChartCore;
7
6
  options: BulletChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: BulletChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  ExperimentalChoroplethChart as ChoroplethChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { ExperimentalChoroplethChart as ChoroplethChartCore, type ChoroplethChar
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: ChoroplethChartCore;
7
6
  options: ChoroplethChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: ChoroplethChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  CirclePackChart as CirclePackChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { CirclePackChart as CirclePackChartCore, type CirclePackChartOptions, ty
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: CirclePackChartCore;
7
6
  options: CirclePackChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: CirclePackChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  ComboChart as ComboChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { ComboChart as ComboChartCore, type ComboChartOptions, type ChartTabular
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: ComboChartCore;
7
6
  options: ComboChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: ComboChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  DonutChart as DonutChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { DonutChart as DonutChartCore, type DonutChartOptions, type ChartTabular
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: DonutChartCore;
7
6
  options: DonutChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: DonutChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  GaugeChart as GaugeChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { GaugeChart as GaugeChartCore, type GaugeChartOptions, type ChartTabular
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: GaugeChartCore;
7
6
  options: GaugeChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: GaugeChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  HeatmapChart as HeatmapChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { HeatmapChart as HeatmapChartCore, type HeatmapChartOptions, type ChartT
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: HeatmapChartCore;
7
6
  options: HeatmapChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: HeatmapChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  HistogramChart as HistogramChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { HistogramChart as HistogramChartCore, type HistogramChartOptions, type
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: HistogramChartCore;
7
6
  options: HistogramChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: HistogramChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  LineChart as LineChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { LineChart as LineChartCore, type LineChartOptions, type ChartTabularDat
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: LineChartCore;
7
6
  options: LineChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: LineChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  LollipopChart as LollipopChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { LollipopChart as LollipopChartCore, type LollipopChartOptions, type Cha
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: LollipopChartCore;
7
6
  options: LollipopChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: LollipopChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  MeterChart as MeterChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { MeterChart as MeterChartCore, type MeterChartOptions, type ChartTabular
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: MeterChartCore;
7
6
  options: MeterChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: MeterChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  PieChart as PieChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { PieChart as PieChartCore, type PieChartOptions, type ChartTabularData }
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: PieChartCore;
7
6
  options: PieChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: PieChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  RadarChart as RadarChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { RadarChart as RadarChartCore, type RadarChartOptions, type ChartTabular
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: RadarChartCore;
7
6
  options: RadarChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: RadarChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  ScatterChart as ScatterChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { ScatterChart as ScatterChartCore, type ScatterChartOptions, type ChartT
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: ScatterChartCore;
7
6
  options: ScatterChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: ScatterChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  StackedAreaChart as StackedAreaChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { StackedAreaChart as StackedAreaChartCore, type StackedAreaChartOptions,
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: StackedAreaChartCore;
7
6
  options: StackedAreaChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: StackedAreaChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  TreeChart as TreeChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { TreeChart as TreeChartCore, type TreeChartOptions, type ChartTabularDat
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: TreeChartCore;
7
6
  options: TreeChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: TreeChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  TreemapChart as TreemapChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { TreemapChart as TreemapChartCore, type TreemapChartOptions, type ChartT
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: TreemapChartCore;
7
6
  options: TreemapChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: TreemapChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
@@ -2,10 +2,10 @@
2
2
  WordCloudChart as WordCloudChartCore
3
3
  } from "@carbon/charts";
4
4
  import BaseChart from "./BaseChart.svelte";
5
- export let chart;
6
5
  export let options;
7
6
  export let data;
8
- export let ref;
7
+ export let chart = null;
8
+ export let ref = null;
9
9
  </script>
10
10
 
11
11
  <BaseChart
@@ -3,10 +3,10 @@ import { WordCloudChart as WordCloudChartCore, type WorldCloudChartOptions, type
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
- chart: WordCloudChartCore;
7
6
  options: WorldCloudChartOptions;
8
7
  data: ChartTabularData;
9
- ref: HTMLDivElement;
8
+ chart?: WordCloudChartCore | null;
9
+ ref?: HTMLDivElement | null;
10
10
  };
11
11
  events: {
12
12
  load: CustomEvent<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon/charts-svelte",
3
- "version": "1.11.8",
3
+ "version": "1.11.10",
4
4
  "description": "Carbon Charts component library for Svelte",
5
5
  "scripts": {
6
6
  "postinstall": "carbon-telemetry collect --install",
@@ -40,24 +40,26 @@
40
40
  "peerDependencies": {
41
41
  "svelte": "^3.31.0 || ^4.0.0"
42
42
  },
43
+ "dependencies": {
44
+ "@carbon/charts": "1.11.10",
45
+ "@carbon/telemetry": "~0.1.0"
46
+ },
43
47
  "devDependencies": {
44
- "@carbon/charts": "1.11.8",
45
- "@carbon/telemetry": "~0.1.0",
46
48
  "@stackblitz/sdk": "^1.9.0",
47
- "@storybook/addon-essentials": "^7.0.26",
48
- "@storybook/addon-interactions": "^7.0.26",
49
- "@storybook/addon-links": "^7.0.26",
50
- "@storybook/blocks": "^7.0.26",
51
- "@storybook/manager-api": "^7.0.26",
52
- "@storybook/svelte": "^7.0.26",
53
- "@storybook/sveltekit": "^7.0.26",
49
+ "@storybook/addon-essentials": "^7.0.27",
50
+ "@storybook/addon-interactions": "^7.0.27",
51
+ "@storybook/addon-links": "^7.0.27",
52
+ "@storybook/blocks": "^7.0.27",
53
+ "@storybook/manager-api": "^7.0.27",
54
+ "@storybook/svelte": "^7.0.27",
55
+ "@storybook/sveltekit": "^7.0.27",
54
56
  "@storybook/testing-library": "^0.2.0",
55
- "@storybook/theming": "^7.0.26",
57
+ "@storybook/theming": "^7.0.27",
56
58
  "@sveltejs/adapter-auto": "^2.1.0",
57
- "@sveltejs/kit": "^1.22.1",
58
- "@sveltejs/package": "^2.1.0",
59
- "@typescript-eslint/eslint-plugin": "^5.61.0",
60
- "@typescript-eslint/parser": "^5.61.0",
59
+ "@sveltejs/kit": "^1.22.3",
60
+ "@sveltejs/package": "^2.2.0",
61
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
62
+ "@typescript-eslint/parser": "^6.0.0",
61
63
  "concurrently": "^8.2.0",
62
64
  "d3": "^7.8.5",
63
65
  "d3-cloud": "^1.2.5",
@@ -70,12 +72,12 @@
70
72
  "publint": "^0.1.16",
71
73
  "react": "^18.2.0",
72
74
  "react-dom": "^18.2.0",
73
- "storybook": "^7.0.26",
75
+ "storybook": "^7.0.27",
74
76
  "svelte": "^4.0.5",
75
- "svelte-check": "^3.4.5",
77
+ "svelte-check": "^3.4.6",
76
78
  "tslib": "^2.6.0",
77
79
  "typescript": "^5.1.6",
78
- "vite": "^4.4.2"
80
+ "vite": "^4.4.3"
79
81
  },
80
82
  "publishConfig": {
81
83
  "access": "public"
@@ -126,5 +128,5 @@
126
128
  "sass",
127
129
  "scss"
128
130
  ],
129
- "gitHead": "be6ab18afdcf69f77f50ca28e51d62126e197cca"
131
+ "gitHead": "4f4eaf872bd512a44cd154a105e7380301f8e246"
130
132
  }