@carbon/charts-svelte 1.22.18 → 1.22.20
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 +18 -0
- package/README.md +34 -55
- package/dist/AlluvialChart.svelte +14 -8
- package/dist/AlluvialChart.svelte.d.ts +9 -35
- package/dist/AreaChart.svelte +14 -8
- package/dist/AreaChart.svelte.d.ts +9 -35
- package/dist/BarChartGrouped.svelte +14 -8
- package/dist/BarChartGrouped.svelte.d.ts +9 -35
- package/dist/BarChartSimple.svelte +14 -8
- package/dist/BarChartSimple.svelte.d.ts +9 -35
- package/dist/BarChartStacked.svelte +14 -8
- package/dist/BarChartStacked.svelte.d.ts +9 -35
- package/dist/BaseChart.svelte +23 -23
- package/dist/BaseChart.svelte.d.ts +33 -31
- package/dist/BoxplotChart.svelte +14 -8
- package/dist/BoxplotChart.svelte.d.ts +9 -35
- package/dist/BubbleChart.svelte +14 -8
- package/dist/BubbleChart.svelte.d.ts +9 -35
- package/dist/BulletChart.svelte +14 -8
- package/dist/BulletChart.svelte.d.ts +9 -35
- package/dist/ChoroplethChart.svelte +14 -8
- package/dist/ChoroplethChart.svelte.d.ts +9 -35
- package/dist/CirclePackChart.svelte +14 -8
- package/dist/CirclePackChart.svelte.d.ts +9 -35
- package/dist/ComboChart.svelte +14 -8
- package/dist/ComboChart.svelte.d.ts +9 -35
- package/dist/DonutChart.svelte +14 -8
- package/dist/DonutChart.svelte.d.ts +9 -35
- package/dist/GaugeChart.svelte +14 -8
- package/dist/GaugeChart.svelte.d.ts +9 -35
- package/dist/HeatmapChart.svelte +14 -8
- package/dist/HeatmapChart.svelte.d.ts +9 -35
- package/dist/HistogramChart.svelte +14 -8
- package/dist/HistogramChart.svelte.d.ts +9 -35
- package/dist/LineChart.svelte +14 -8
- package/dist/LineChart.svelte.d.ts +9 -35
- package/dist/LollipopChart.svelte +14 -8
- package/dist/LollipopChart.svelte.d.ts +9 -35
- package/dist/MeterChart.svelte +14 -8
- package/dist/MeterChart.svelte.d.ts +9 -35
- package/dist/PieChart.svelte +14 -8
- package/dist/PieChart.svelte.d.ts +9 -35
- package/dist/RadarChart.svelte +14 -8
- package/dist/RadarChart.svelte.d.ts +9 -35
- package/dist/ScatterChart.svelte +14 -8
- package/dist/ScatterChart.svelte.d.ts +9 -35
- package/dist/StackedAreaChart.svelte +14 -8
- package/dist/StackedAreaChart.svelte.d.ts +9 -32
- package/dist/TreeChart.svelte +14 -8
- package/dist/TreeChart.svelte.d.ts +9 -35
- package/dist/TreemapChart.svelte +14 -8
- package/dist/TreemapChart.svelte.d.ts +9 -35
- package/dist/WordCloudChart.svelte +14 -8
- package/dist/WordCloudChart.svelte.d.ts +9 -36
- package/dist/interfaces.d.ts +24 -0
- package/dist/interfaces.js +1 -0
- package/dist/styles.css +198 -0
- package/dist/styles.css.map +1 -1
- package/dist/styles.min.css +197 -0
- package/dist/styles.min.css.map +1 -1
- package/package.json +13 -13
package/dist/BaseChart.svelte
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import { onMount,
|
|
3
|
-
const chartHolderCssClass = 'cds--chart-holder'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
<script>
|
|
2
|
+
import { onMount, onDestroy } from 'svelte'
|
|
3
|
+
const chartHolderCssClass = 'cds--chart-holder'
|
|
4
|
+
let {
|
|
5
|
+
id = `chart-${Math.random().toString(36)}`,
|
|
6
|
+
data = [],
|
|
7
|
+
options = {},
|
|
8
|
+
ref = $bindable(),
|
|
9
|
+
chart = $bindable(),
|
|
10
|
+
Chart,
|
|
11
|
+
onload,
|
|
12
|
+
onupdate,
|
|
13
|
+
ondestroy,
|
|
14
|
+
...rest
|
|
15
|
+
} = $props()
|
|
11
16
|
onMount(() => {
|
|
12
17
|
try {
|
|
13
18
|
chart = new Chart(ref, { data, options })
|
|
14
|
-
|
|
19
|
+
onload?.()
|
|
15
20
|
} catch (error) {
|
|
16
21
|
console.error('Failed to initialize chart:', error)
|
|
17
22
|
}
|
|
18
23
|
})
|
|
19
|
-
|
|
24
|
+
$effect(() => {
|
|
20
25
|
if (chart) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
dispatch('update', { data, options })
|
|
25
|
-
} catch (error) {
|
|
26
|
-
console.error('Failed to update chart:', error)
|
|
27
|
-
}
|
|
26
|
+
chart.model.setData(data)
|
|
27
|
+
chart.model.setOptions(options)
|
|
28
|
+
onupdate?.({ data, options })
|
|
28
29
|
}
|
|
29
30
|
})
|
|
30
31
|
onDestroy(() => {
|
|
31
32
|
if (chart) {
|
|
32
|
-
dispatch('destroy')
|
|
33
|
-
// Like core's Chart.destroy() but keeps div chart holder bound to ref as it's part of this template
|
|
34
33
|
chart.components.forEach(component => component.destroy())
|
|
35
34
|
chart.model.set({ destroyed: true }, { skipUpdate: true })
|
|
36
|
-
chart =
|
|
35
|
+
chart = void 0
|
|
36
|
+
ondestroy?.()
|
|
37
37
|
}
|
|
38
38
|
})
|
|
39
39
|
</script>
|
|
40
40
|
|
|
41
|
-
<div {id} bind:this={ref} class={chartHolderCssClass} {
|
|
41
|
+
<div {id} bind:this={ref} class={chartHolderCssClass} {...rest}></div>
|
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
declare class __sveltets_Render<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
chart: Charts | undefined
|
|
10
|
-
ref: HTMLDivElement | undefined
|
|
11
|
-
id?: string | undefined
|
|
12
|
-
}
|
|
13
|
-
events(): {
|
|
14
|
-
load: CustomEvent<null>
|
|
15
|
-
update: CustomEvent<{
|
|
16
|
-
data: ChartTabularData
|
|
17
|
-
options: T
|
|
18
|
-
}>
|
|
19
|
-
destroy: CustomEvent<null>
|
|
20
|
-
} & {
|
|
21
|
-
[evt: string]: CustomEvent<any>
|
|
22
|
-
}
|
|
1
|
+
import type { Charts, BaseChartOptions } from '@carbon/charts'
|
|
2
|
+
import type { BaseChartProps } from './interfaces'
|
|
3
|
+
declare class __sveltets_Render<
|
|
4
|
+
ChartType extends Charts,
|
|
5
|
+
ChartOptionType extends BaseChartOptions
|
|
6
|
+
> {
|
|
7
|
+
props(): BaseChartProps<ChartType, ChartOptionType>
|
|
8
|
+
events(): {}
|
|
23
9
|
slots(): {}
|
|
10
|
+
bindings(): 'ref' | 'chart'
|
|
11
|
+
exports(): {}
|
|
24
12
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
>
|
|
33
|
-
|
|
13
|
+
interface $$IsomorphicComponent {
|
|
14
|
+
new <ChartType extends Charts, ChartOptionType extends BaseChartOptions>(
|
|
15
|
+
options: import('svelte').ComponentConstructorOptions<
|
|
16
|
+
ReturnType<__sveltets_Render<ChartType, ChartOptionType>['props']>
|
|
17
|
+
>
|
|
18
|
+
): import('svelte').SvelteComponent<
|
|
19
|
+
ReturnType<__sveltets_Render<ChartType, ChartOptionType>['props']>,
|
|
20
|
+
ReturnType<__sveltets_Render<ChartType, ChartOptionType>['events']>,
|
|
21
|
+
ReturnType<__sveltets_Render<ChartType, ChartOptionType>['slots']>
|
|
22
|
+
> & {
|
|
23
|
+
$$bindings?: ReturnType<__sveltets_Render<ChartType, ChartOptionType>['bindings']>
|
|
24
|
+
} & ReturnType<__sveltets_Render<ChartType, ChartOptionType>['exports']>
|
|
25
|
+
<ChartType extends Charts, ChartOptionType extends BaseChartOptions>(
|
|
26
|
+
internal: unknown,
|
|
27
|
+
props: ReturnType<__sveltets_Render<ChartType, ChartOptionType>['props']> & {}
|
|
28
|
+
): ReturnType<__sveltets_Render<ChartType, ChartOptionType>['exports']>
|
|
29
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any, any>['bindings']>
|
|
30
|
+
}
|
|
31
|
+
declare const BaseChart: $$IsomorphicComponent
|
|
32
|
+
type BaseChart<ChartType extends Charts, ChartOptionType extends BaseChartOptions> = InstanceType<
|
|
33
|
+
typeof BaseChart<ChartType, ChartOptionType>
|
|
34
|
+
>
|
|
35
|
+
export default BaseChart
|
package/dist/BoxplotChart.svelte
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { BoxplotChart as BoxplotChartCore } from '@carbon/charts'
|
|
3
3
|
import BaseChart from './BaseChart.svelte'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
options,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
chart = $bindable(),
|
|
9
|
+
onload,
|
|
10
|
+
onupdate,
|
|
11
|
+
ondestroy,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props()
|
|
8
14
|
</script>
|
|
9
15
|
|
|
10
16
|
<BaseChart
|
|
11
|
-
{...$$restProps}
|
|
12
17
|
Chart={BoxplotChartCore}
|
|
13
18
|
{options}
|
|
14
19
|
{data}
|
|
15
20
|
bind:ref
|
|
16
21
|
bind:chart
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
{onload}
|
|
23
|
+
{onupdate}
|
|
24
|
+
{ondestroy}
|
|
25
|
+
{...rest} />
|
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
options: BoxplotChartOptions
|
|
11
|
-
data: ChartTabularData
|
|
12
|
-
chart?: BoxplotChartCore | undefined
|
|
13
|
-
ref?: HTMLDivElement | undefined
|
|
14
|
-
}
|
|
15
|
-
events: {
|
|
16
|
-
load: CustomEvent<null>
|
|
17
|
-
update: CustomEvent<{
|
|
18
|
-
data: ChartTabularData
|
|
19
|
-
options: import('@carbon/charts').BaseChartOptions
|
|
20
|
-
}>
|
|
21
|
-
destroy: CustomEvent<null>
|
|
22
|
-
} & {
|
|
23
|
-
[evt: string]: CustomEvent<any>
|
|
24
|
-
}
|
|
25
|
-
slots: {}
|
|
26
|
-
}
|
|
27
|
-
export type BoxplotChartProps = typeof __propDef.props
|
|
28
|
-
export type BoxplotChartEvents = typeof __propDef.events
|
|
29
|
-
export type BoxplotChartSlots = typeof __propDef.slots
|
|
30
|
-
export default class BoxplotChart extends SvelteComponentTyped<
|
|
31
|
-
BoxplotChartProps,
|
|
32
|
-
BoxplotChartEvents,
|
|
33
|
-
BoxplotChartSlots
|
|
34
|
-
> {}
|
|
35
|
-
export {}
|
|
1
|
+
import { BoxplotChart as BoxplotChartCore } from '@carbon/charts'
|
|
2
|
+
import type { ChartProps } from './interfaces'
|
|
3
|
+
declare const BoxplotChart: import('svelte').Component<
|
|
4
|
+
ChartProps<BoxplotChartCore, import('@carbon/charts').AxisChartOptions>,
|
|
5
|
+
{},
|
|
6
|
+
'ref' | 'chart'
|
|
7
|
+
>
|
|
8
|
+
type BoxplotChart = ReturnType<typeof BoxplotChart>
|
|
9
|
+
export default BoxplotChart
|
package/dist/BubbleChart.svelte
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { BubbleChart as BubbleChartCore } from '@carbon/charts'
|
|
3
3
|
import BaseChart from './BaseChart.svelte'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
options,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
chart = $bindable(),
|
|
9
|
+
onload,
|
|
10
|
+
onupdate,
|
|
11
|
+
ondestroy,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props()
|
|
8
14
|
</script>
|
|
9
15
|
|
|
10
16
|
<BaseChart
|
|
11
|
-
{...$$restProps}
|
|
12
17
|
Chart={BubbleChartCore}
|
|
13
18
|
{options}
|
|
14
19
|
{data}
|
|
15
20
|
bind:ref
|
|
16
21
|
bind:chart
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
{onload}
|
|
23
|
+
{onupdate}
|
|
24
|
+
{ondestroy}
|
|
25
|
+
{...rest} />
|
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
options: BubbleChartOptions
|
|
11
|
-
data: ChartTabularData
|
|
12
|
-
chart?: BubbleChartCore | undefined
|
|
13
|
-
ref?: HTMLDivElement | undefined
|
|
14
|
-
}
|
|
15
|
-
events: {
|
|
16
|
-
load: CustomEvent<null>
|
|
17
|
-
update: CustomEvent<{
|
|
18
|
-
data: ChartTabularData
|
|
19
|
-
options: import('@carbon/charts').BaseChartOptions
|
|
20
|
-
}>
|
|
21
|
-
destroy: CustomEvent<null>
|
|
22
|
-
} & {
|
|
23
|
-
[evt: string]: CustomEvent<any>
|
|
24
|
-
}
|
|
25
|
-
slots: {}
|
|
26
|
-
}
|
|
27
|
-
export type BubbleChartProps = typeof __propDef.props
|
|
28
|
-
export type BubbleChartEvents = typeof __propDef.events
|
|
29
|
-
export type BubbleChartSlots = typeof __propDef.slots
|
|
30
|
-
export default class BubbleChart extends SvelteComponentTyped<
|
|
31
|
-
BubbleChartProps,
|
|
32
|
-
BubbleChartEvents,
|
|
33
|
-
BubbleChartSlots
|
|
34
|
-
> {}
|
|
35
|
-
export {}
|
|
1
|
+
import { BubbleChart as BubbleChartCore, type BubbleChartOptions } from '@carbon/charts'
|
|
2
|
+
import type { ChartProps } from './interfaces'
|
|
3
|
+
declare const BubbleChart: import('svelte').Component<
|
|
4
|
+
ChartProps<BubbleChartCore, BubbleChartOptions>,
|
|
5
|
+
{},
|
|
6
|
+
'ref' | 'chart'
|
|
7
|
+
>
|
|
8
|
+
type BubbleChart = ReturnType<typeof BubbleChart>
|
|
9
|
+
export default BubbleChart
|
package/dist/BulletChart.svelte
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { BulletChart as BulletChartCore } from '@carbon/charts'
|
|
3
3
|
import BaseChart from './BaseChart.svelte'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
options,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
chart = $bindable(),
|
|
9
|
+
onload,
|
|
10
|
+
onupdate,
|
|
11
|
+
ondestroy,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props()
|
|
8
14
|
</script>
|
|
9
15
|
|
|
10
16
|
<BaseChart
|
|
11
|
-
{...$$restProps}
|
|
12
17
|
Chart={BulletChartCore}
|
|
13
18
|
{options}
|
|
14
19
|
{data}
|
|
15
20
|
bind:ref
|
|
16
21
|
bind:chart
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
{onload}
|
|
23
|
+
{onupdate}
|
|
24
|
+
{ondestroy}
|
|
25
|
+
{...rest} />
|
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
options: BulletChartOptions
|
|
11
|
-
data: ChartTabularData
|
|
12
|
-
chart?: BulletChartCore | undefined
|
|
13
|
-
ref?: HTMLDivElement | undefined
|
|
14
|
-
}
|
|
15
|
-
events: {
|
|
16
|
-
load: CustomEvent<null>
|
|
17
|
-
update: CustomEvent<{
|
|
18
|
-
data: ChartTabularData
|
|
19
|
-
options: import('@carbon/charts').BaseChartOptions
|
|
20
|
-
}>
|
|
21
|
-
destroy: CustomEvent<null>
|
|
22
|
-
} & {
|
|
23
|
-
[evt: string]: CustomEvent<any>
|
|
24
|
-
}
|
|
25
|
-
slots: {}
|
|
26
|
-
}
|
|
27
|
-
export type BulletChartProps = typeof __propDef.props
|
|
28
|
-
export type BulletChartEvents = typeof __propDef.events
|
|
29
|
-
export type BulletChartSlots = typeof __propDef.slots
|
|
30
|
-
export default class BulletChart extends SvelteComponentTyped<
|
|
31
|
-
BulletChartProps,
|
|
32
|
-
BulletChartEvents,
|
|
33
|
-
BulletChartSlots
|
|
34
|
-
> {}
|
|
35
|
-
export {}
|
|
1
|
+
import { BulletChart as BulletChartCore, type BulletChartOptions } from '@carbon/charts'
|
|
2
|
+
import type { ChartProps } from './interfaces'
|
|
3
|
+
declare const BulletChart: import('svelte').Component<
|
|
4
|
+
ChartProps<BulletChartCore, BulletChartOptions>,
|
|
5
|
+
{},
|
|
6
|
+
'ref' | 'chart'
|
|
7
|
+
>
|
|
8
|
+
type BulletChart = ReturnType<typeof BulletChart>
|
|
9
|
+
export default BulletChart
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { ChoroplethChart as ChoroplethChartCore } from '@carbon/charts'
|
|
3
3
|
import BaseChart from './BaseChart.svelte'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
options,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
chart = $bindable(),
|
|
9
|
+
onload,
|
|
10
|
+
onupdate,
|
|
11
|
+
ondestroy,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props()
|
|
8
14
|
</script>
|
|
9
15
|
|
|
10
16
|
<BaseChart
|
|
11
|
-
{...$$restProps}
|
|
12
17
|
Chart={ChoroplethChartCore}
|
|
13
18
|
{options}
|
|
14
19
|
{data}
|
|
15
20
|
bind:ref
|
|
16
21
|
bind:chart
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
{onload}
|
|
23
|
+
{onupdate}
|
|
24
|
+
{ondestroy}
|
|
25
|
+
{...rest} />
|
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
options: ChoroplethChartOptions
|
|
11
|
-
data: ChartTabularData
|
|
12
|
-
chart?: ChoroplethChartCore | undefined
|
|
13
|
-
ref?: HTMLDivElement | undefined
|
|
14
|
-
}
|
|
15
|
-
events: {
|
|
16
|
-
load: CustomEvent<null>
|
|
17
|
-
update: CustomEvent<{
|
|
18
|
-
data: ChartTabularData
|
|
19
|
-
options: import('@carbon/charts').BaseChartOptions
|
|
20
|
-
}>
|
|
21
|
-
destroy: CustomEvent<null>
|
|
22
|
-
} & {
|
|
23
|
-
[evt: string]: CustomEvent<any>
|
|
24
|
-
}
|
|
25
|
-
slots: {}
|
|
26
|
-
}
|
|
27
|
-
export type ChoroplethChartProps = typeof __propDef.props
|
|
28
|
-
export type ChoroplethChartEvents = typeof __propDef.events
|
|
29
|
-
export type ChoroplethChartSlots = typeof __propDef.slots
|
|
30
|
-
export default class ChoroplethChart extends SvelteComponentTyped<
|
|
31
|
-
ChoroplethChartProps,
|
|
32
|
-
ChoroplethChartEvents,
|
|
33
|
-
ChoroplethChartSlots
|
|
34
|
-
> {}
|
|
35
|
-
export {}
|
|
1
|
+
import { ChoroplethChart as ChoroplethChartCore, type ChoroplethChartOptions } from '@carbon/charts'
|
|
2
|
+
import type { ChartProps } from './interfaces'
|
|
3
|
+
declare const ChoroplethChart: import('svelte').Component<
|
|
4
|
+
ChartProps<ChoroplethChartCore, ChoroplethChartOptions>,
|
|
5
|
+
{},
|
|
6
|
+
'ref' | 'chart'
|
|
7
|
+
>
|
|
8
|
+
type ChoroplethChart = ReturnType<typeof ChoroplethChart>
|
|
9
|
+
export default ChoroplethChart
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { CirclePackChart as CirclePackChartCore } from '@carbon/charts'
|
|
3
3
|
import BaseChart from './BaseChart.svelte'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
options,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
chart = $bindable(),
|
|
9
|
+
onload,
|
|
10
|
+
onupdate,
|
|
11
|
+
ondestroy,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props()
|
|
8
14
|
</script>
|
|
9
15
|
|
|
10
16
|
<BaseChart
|
|
11
|
-
{...$$restProps}
|
|
12
17
|
Chart={CirclePackChartCore}
|
|
13
18
|
{options}
|
|
14
19
|
{data}
|
|
15
20
|
bind:ref
|
|
16
21
|
bind:chart
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
{onload}
|
|
23
|
+
{onupdate}
|
|
24
|
+
{ondestroy}
|
|
25
|
+
{...rest} />
|
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
options: CirclePackChartOptions
|
|
11
|
-
data: ChartTabularData
|
|
12
|
-
chart?: CirclePackChartCore | undefined
|
|
13
|
-
ref?: HTMLDivElement | undefined
|
|
14
|
-
}
|
|
15
|
-
events: {
|
|
16
|
-
load: CustomEvent<null>
|
|
17
|
-
update: CustomEvent<{
|
|
18
|
-
data: ChartTabularData
|
|
19
|
-
options: import('@carbon/charts').BaseChartOptions
|
|
20
|
-
}>
|
|
21
|
-
destroy: CustomEvent<null>
|
|
22
|
-
} & {
|
|
23
|
-
[evt: string]: CustomEvent<any>
|
|
24
|
-
}
|
|
25
|
-
slots: {}
|
|
26
|
-
}
|
|
27
|
-
export type CirclePackChartProps = typeof __propDef.props
|
|
28
|
-
export type CirclePackChartEvents = typeof __propDef.events
|
|
29
|
-
export type CirclePackChartSlots = typeof __propDef.slots
|
|
30
|
-
export default class CirclePackChart extends SvelteComponentTyped<
|
|
31
|
-
CirclePackChartProps,
|
|
32
|
-
CirclePackChartEvents,
|
|
33
|
-
CirclePackChartSlots
|
|
34
|
-
> {}
|
|
35
|
-
export {}
|
|
1
|
+
import { CirclePackChart as CirclePackChartCore, type CirclePackChartOptions } from '@carbon/charts'
|
|
2
|
+
import type { ChartProps } from './interfaces'
|
|
3
|
+
declare const CirclePackChart: import('svelte').Component<
|
|
4
|
+
ChartProps<CirclePackChartCore, CirclePackChartOptions>,
|
|
5
|
+
{},
|
|
6
|
+
'ref' | 'chart'
|
|
7
|
+
>
|
|
8
|
+
type CirclePackChart = ReturnType<typeof CirclePackChart>
|
|
9
|
+
export default CirclePackChart
|
package/dist/ComboChart.svelte
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { ComboChart as ComboChartCore } from '@carbon/charts'
|
|
3
3
|
import BaseChart from './BaseChart.svelte'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
options,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
chart = $bindable(),
|
|
9
|
+
onload,
|
|
10
|
+
onupdate,
|
|
11
|
+
ondestroy,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props()
|
|
8
14
|
</script>
|
|
9
15
|
|
|
10
16
|
<BaseChart
|
|
11
|
-
{...$$restProps}
|
|
12
17
|
Chart={ComboChartCore}
|
|
13
18
|
{options}
|
|
14
19
|
{data}
|
|
15
20
|
bind:ref
|
|
16
21
|
bind:chart
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
{onload}
|
|
23
|
+
{onupdate}
|
|
24
|
+
{ondestroy}
|
|
25
|
+
{...rest} />
|
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
options: ComboChartOptions
|
|
11
|
-
data: ChartTabularData
|
|
12
|
-
chart?: ComboChartCore | undefined
|
|
13
|
-
ref?: HTMLDivElement | undefined
|
|
14
|
-
}
|
|
15
|
-
events: {
|
|
16
|
-
load: CustomEvent<null>
|
|
17
|
-
update: CustomEvent<{
|
|
18
|
-
data: ChartTabularData
|
|
19
|
-
options: import('@carbon/charts').BaseChartOptions
|
|
20
|
-
}>
|
|
21
|
-
destroy: CustomEvent<null>
|
|
22
|
-
} & {
|
|
23
|
-
[evt: string]: CustomEvent<any>
|
|
24
|
-
}
|
|
25
|
-
slots: {}
|
|
26
|
-
}
|
|
27
|
-
export type ComboChartProps = typeof __propDef.props
|
|
28
|
-
export type ComboChartEvents = typeof __propDef.events
|
|
29
|
-
export type ComboChartSlots = typeof __propDef.slots
|
|
30
|
-
export default class ComboChart extends SvelteComponentTyped<
|
|
31
|
-
ComboChartProps,
|
|
32
|
-
ComboChartEvents,
|
|
33
|
-
ComboChartSlots
|
|
34
|
-
> {}
|
|
35
|
-
export {}
|
|
1
|
+
import { ComboChart as ComboChartCore, type ComboChartOptions } from '@carbon/charts'
|
|
2
|
+
import type { ChartProps } from './interfaces'
|
|
3
|
+
declare const ComboChart: import('svelte').Component<
|
|
4
|
+
ChartProps<ComboChartCore, ComboChartOptions>,
|
|
5
|
+
{},
|
|
6
|
+
'ref' | 'chart'
|
|
7
|
+
>
|
|
8
|
+
type ComboChart = ReturnType<typeof ComboChart>
|
|
9
|
+
export default ComboChart
|
package/dist/DonutChart.svelte
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { DonutChart as DonutChartCore } from '@carbon/charts'
|
|
3
3
|
import BaseChart from './BaseChart.svelte'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
options,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
chart = $bindable(),
|
|
9
|
+
onload,
|
|
10
|
+
onupdate,
|
|
11
|
+
ondestroy,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props()
|
|
8
14
|
</script>
|
|
9
15
|
|
|
10
16
|
<BaseChart
|
|
11
|
-
{...$$restProps}
|
|
12
17
|
Chart={DonutChartCore}
|
|
13
18
|
{options}
|
|
14
19
|
{data}
|
|
15
20
|
bind:ref
|
|
16
21
|
bind:chart
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
{onload}
|
|
23
|
+
{onupdate}
|
|
24
|
+
{ondestroy}
|
|
25
|
+
{...rest} />
|