@carbon/charts-svelte 1.22.17 → 1.22.19
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 +35 -54
- package/dist/AlluvialChart.svelte +16 -15
- package/dist/AlluvialChart.svelte.d.ts +9 -32
- package/dist/AreaChart.svelte +16 -15
- package/dist/AreaChart.svelte.d.ts +9 -32
- package/dist/BarChartGrouped.svelte +16 -15
- package/dist/BarChartGrouped.svelte.d.ts +9 -32
- package/dist/BarChartSimple.svelte +16 -15
- package/dist/BarChartSimple.svelte.d.ts +9 -32
- package/dist/BarChartStacked.svelte +16 -14
- package/dist/BarChartStacked.svelte.d.ts +9 -32
- package/dist/BaseChart.svelte +24 -39
- package/dist/BaseChart.svelte.d.ts +32 -34
- package/dist/BoxplotChart.svelte +16 -15
- package/dist/BoxplotChart.svelte.d.ts +9 -32
- package/dist/BubbleChart.svelte +16 -15
- package/dist/BubbleChart.svelte.d.ts +9 -32
- package/dist/BulletChart.svelte +16 -15
- package/dist/BulletChart.svelte.d.ts +9 -32
- package/dist/ChoroplethChart.svelte +16 -15
- package/dist/ChoroplethChart.svelte.d.ts +9 -32
- package/dist/CirclePackChart.svelte +16 -15
- package/dist/CirclePackChart.svelte.d.ts +9 -32
- package/dist/ComboChart.svelte +16 -15
- package/dist/ComboChart.svelte.d.ts +9 -32
- package/dist/DonutChart.svelte +16 -15
- package/dist/DonutChart.svelte.d.ts +9 -32
- package/dist/GaugeChart.svelte +16 -15
- package/dist/GaugeChart.svelte.d.ts +9 -32
- package/dist/HeatmapChart.svelte +16 -15
- package/dist/HeatmapChart.svelte.d.ts +9 -32
- package/dist/HistogramChart.svelte +16 -15
- package/dist/HistogramChart.svelte.d.ts +9 -32
- package/dist/LineChart.svelte +16 -15
- package/dist/LineChart.svelte.d.ts +9 -32
- package/dist/LollipopChart.svelte +16 -15
- package/dist/LollipopChart.svelte.d.ts +9 -32
- package/dist/MeterChart.svelte +16 -15
- package/dist/MeterChart.svelte.d.ts +9 -32
- package/dist/PieChart.svelte +16 -15
- package/dist/PieChart.svelte.d.ts +9 -32
- package/dist/RadarChart.svelte +16 -15
- package/dist/RadarChart.svelte.d.ts +9 -32
- package/dist/ScatterChart.svelte +16 -15
- package/dist/ScatterChart.svelte.d.ts +9 -32
- package/dist/StackedAreaChart.svelte +16 -15
- package/dist/StackedAreaChart.svelte.d.ts +12 -32
- package/dist/TreeChart.svelte +16 -15
- package/dist/TreeChart.svelte.d.ts +9 -32
- package/dist/TreemapChart.svelte +16 -15
- package/dist/TreemapChart.svelte.d.ts +9 -32
- package/dist/WordCloudChart.svelte +16 -16
- package/dist/WordCloudChart.svelte.d.ts +9 -32
- package/dist/index.d.ts +141 -36
- package/dist/index.js +109 -31
- package/dist/interfaces.d.ts +24 -0
- package/dist/interfaces.js +1 -0
- package/dist/styles.css +4656 -4357
- package/dist/styles.css.map +1 -1
- package/dist/styles.min.css +7097 -1
- package/dist/styles.min.css.map +1 -1
- package/package.json +16 -12
package/dist/BaseChart.svelte
CHANGED
|
@@ -1,56 +1,41 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export let options: T = {} as T // Specific chart option type, default is empty
|
|
17
|
-
export let Chart: CoreChartClass // Used to instantiate next property
|
|
18
|
-
export let chart: Charts | undefined // Instance of the chart class
|
|
19
|
-
export let ref: HTMLDivElement | undefined // Binding to chart 'holder' in template below
|
|
20
|
-
export let id = `chart-${Math.random().toString(36)}` // id for chart holder element
|
|
21
|
-
|
|
22
|
-
const dispatch = createEventDispatcher<DispatchedEvents>()
|
|
23
|
-
|
|
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()
|
|
24
16
|
onMount(() => {
|
|
25
17
|
try {
|
|
26
|
-
chart = new Chart(ref
|
|
27
|
-
|
|
18
|
+
chart = new Chart(ref, { data, options })
|
|
19
|
+
onload?.()
|
|
28
20
|
} catch (error) {
|
|
29
21
|
console.error('Failed to initialize chart:', error)
|
|
30
22
|
}
|
|
31
23
|
})
|
|
32
|
-
|
|
33
|
-
afterUpdate(() => {
|
|
24
|
+
$effect(() => {
|
|
34
25
|
if (chart) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
dispatch('update', { data, options })
|
|
39
|
-
} catch (error) {
|
|
40
|
-
console.error('Failed to update chart:', error)
|
|
41
|
-
}
|
|
26
|
+
chart.model.setData(data)
|
|
27
|
+
chart.model.setOptions(options)
|
|
28
|
+
onupdate?.({ data, options })
|
|
42
29
|
}
|
|
43
30
|
})
|
|
44
|
-
|
|
45
31
|
onDestroy(() => {
|
|
46
32
|
if (chart) {
|
|
47
|
-
dispatch('destroy')
|
|
48
|
-
// Like core's Chart.destroy() but keeps div chart holder bound to ref as it's part of the template below
|
|
49
33
|
chart.components.forEach(component => component.destroy())
|
|
50
34
|
chart.model.set({ destroyed: true }, { skipUpdate: true })
|
|
51
|
-
chart =
|
|
35
|
+
chart = void 0
|
|
36
|
+
ondestroy?.()
|
|
52
37
|
}
|
|
53
38
|
})
|
|
54
39
|
</script>
|
|
55
40
|
|
|
56
|
-
<div {id} bind:this={ref} class={chartHolderCssClass} {
|
|
41
|
+
<div {id} bind:this={ref} class={chartHolderCssClass} {...rest}></div>
|
|
@@ -1,37 +1,35 @@
|
|
|
1
|
-
import type { Charts,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
events(): {
|
|
13
|
-
load: CustomEvent<null>;
|
|
14
|
-
update: CustomEvent<{
|
|
15
|
-
data: ChartTabularData;
|
|
16
|
-
options: T;
|
|
17
|
-
}>;
|
|
18
|
-
destroy: CustomEvent<null>;
|
|
19
|
-
} & {
|
|
20
|
-
[evt: string]: CustomEvent<any>;
|
|
21
|
-
};
|
|
22
|
-
slots(): {};
|
|
23
|
-
bindings(): string;
|
|
24
|
-
exports(): {};
|
|
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(): {}
|
|
9
|
+
slots(): {}
|
|
10
|
+
bindings(): 'ref' | 'chart'
|
|
11
|
+
exports(): {}
|
|
25
12
|
}
|
|
26
13
|
interface $$IsomorphicComponent {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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']>
|
|
34
30
|
}
|
|
35
|
-
declare const BaseChart: $$IsomorphicComponent
|
|
36
|
-
type BaseChart<
|
|
37
|
-
|
|
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,24 +1,25 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
BoxplotChart as BoxplotChartCore,
|
|
4
|
-
type BoxplotChartOptions,
|
|
5
|
-
type ChartTabularData
|
|
6
|
-
} from '@carbon/charts'
|
|
1
|
+
<script>
|
|
2
|
+
import { BoxplotChart as BoxplotChartCore } from '@carbon/charts'
|
|
7
3
|
import BaseChart from './BaseChart.svelte'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
options,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
chart = $bindable(),
|
|
9
|
+
onload,
|
|
10
|
+
onupdate,
|
|
11
|
+
ondestroy,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props()
|
|
13
14
|
</script>
|
|
14
15
|
|
|
15
16
|
<BaseChart
|
|
16
|
-
{...$$restProps}
|
|
17
17
|
Chart={BoxplotChartCore}
|
|
18
18
|
{options}
|
|
19
19
|
{data}
|
|
20
20
|
bind:ref
|
|
21
21
|
bind:chart
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
{onload}
|
|
23
|
+
{onupdate}
|
|
24
|
+
{ondestroy}
|
|
25
|
+
{...rest} />
|
|
@@ -1,32 +1,9 @@
|
|
|
1
|
-
import { BoxplotChart as BoxplotChartCore
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const BoxplotChart: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
[x: string]: any;
|
|
17
|
-
options: BoxplotChartOptions;
|
|
18
|
-
data: ChartTabularData;
|
|
19
|
-
chart?: BoxplotChartCore | undefined;
|
|
20
|
-
ref?: HTMLDivElement | undefined;
|
|
21
|
-
}, {
|
|
22
|
-
load: CustomEvent<null>;
|
|
23
|
-
update: CustomEvent<{
|
|
24
|
-
data: ChartTabularData;
|
|
25
|
-
options: import("@carbon/charts").BaseChartOptions;
|
|
26
|
-
}>;
|
|
27
|
-
destroy: CustomEvent<null>;
|
|
28
|
-
} & {
|
|
29
|
-
[evt: string]: CustomEvent<any>;
|
|
30
|
-
}, {}, {}, string>;
|
|
31
|
-
type BoxplotChart = InstanceType<typeof BoxplotChart>;
|
|
32
|
-
export default BoxplotChart;
|
|
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,24 +1,25 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
BubbleChart as BubbleChartCore,
|
|
4
|
-
type BubbleChartOptions,
|
|
5
|
-
type ChartTabularData
|
|
6
|
-
} from '@carbon/charts'
|
|
1
|
+
<script>
|
|
2
|
+
import { BubbleChart as BubbleChartCore } from '@carbon/charts'
|
|
7
3
|
import BaseChart from './BaseChart.svelte'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
options,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
chart = $bindable(),
|
|
9
|
+
onload,
|
|
10
|
+
onupdate,
|
|
11
|
+
ondestroy,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props()
|
|
13
14
|
</script>
|
|
14
15
|
|
|
15
16
|
<BaseChart
|
|
16
|
-
{...$$restProps}
|
|
17
17
|
Chart={BubbleChartCore}
|
|
18
18
|
{options}
|
|
19
19
|
{data}
|
|
20
20
|
bind:ref
|
|
21
21
|
bind:chart
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
{onload}
|
|
23
|
+
{onupdate}
|
|
24
|
+
{ondestroy}
|
|
25
|
+
{...rest} />
|
|
@@ -1,32 +1,9 @@
|
|
|
1
|
-
import { BubbleChart as BubbleChartCore, type BubbleChartOptions
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const BubbleChart: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
[x: string]: any;
|
|
17
|
-
options: BubbleChartOptions;
|
|
18
|
-
data: ChartTabularData;
|
|
19
|
-
chart?: BubbleChartCore | undefined;
|
|
20
|
-
ref?: HTMLDivElement | undefined;
|
|
21
|
-
}, {
|
|
22
|
-
load: CustomEvent<null>;
|
|
23
|
-
update: CustomEvent<{
|
|
24
|
-
data: ChartTabularData;
|
|
25
|
-
options: import("@carbon/charts").BaseChartOptions;
|
|
26
|
-
}>;
|
|
27
|
-
destroy: CustomEvent<null>;
|
|
28
|
-
} & {
|
|
29
|
-
[evt: string]: CustomEvent<any>;
|
|
30
|
-
}, {}, {}, string>;
|
|
31
|
-
type BubbleChart = InstanceType<typeof BubbleChart>;
|
|
32
|
-
export default BubbleChart;
|
|
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,24 +1,25 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
BulletChart as BulletChartCore,
|
|
4
|
-
type BulletChartOptions,
|
|
5
|
-
type ChartTabularData
|
|
6
|
-
} from '@carbon/charts'
|
|
1
|
+
<script>
|
|
2
|
+
import { BulletChart as BulletChartCore } from '@carbon/charts'
|
|
7
3
|
import BaseChart from './BaseChart.svelte'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
options,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
chart = $bindable(),
|
|
9
|
+
onload,
|
|
10
|
+
onupdate,
|
|
11
|
+
ondestroy,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props()
|
|
13
14
|
</script>
|
|
14
15
|
|
|
15
16
|
<BaseChart
|
|
16
|
-
{...$$restProps}
|
|
17
17
|
Chart={BulletChartCore}
|
|
18
18
|
{options}
|
|
19
19
|
{data}
|
|
20
20
|
bind:ref
|
|
21
21
|
bind:chart
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
{onload}
|
|
23
|
+
{onupdate}
|
|
24
|
+
{ondestroy}
|
|
25
|
+
{...rest} />
|
|
@@ -1,32 +1,9 @@
|
|
|
1
|
-
import { BulletChart as BulletChartCore, type BulletChartOptions
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const BulletChart: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
[x: string]: any;
|
|
17
|
-
options: BulletChartOptions;
|
|
18
|
-
data: ChartTabularData;
|
|
19
|
-
chart?: BulletChartCore | undefined;
|
|
20
|
-
ref?: HTMLDivElement | undefined;
|
|
21
|
-
}, {
|
|
22
|
-
load: CustomEvent<null>;
|
|
23
|
-
update: CustomEvent<{
|
|
24
|
-
data: ChartTabularData;
|
|
25
|
-
options: import("@carbon/charts").BaseChartOptions;
|
|
26
|
-
}>;
|
|
27
|
-
destroy: CustomEvent<null>;
|
|
28
|
-
} & {
|
|
29
|
-
[evt: string]: CustomEvent<any>;
|
|
30
|
-
}, {}, {}, string>;
|
|
31
|
-
type BulletChart = InstanceType<typeof BulletChart>;
|
|
32
|
-
export default BulletChart;
|
|
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,24 +1,25 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
ChoroplethChart as ChoroplethChartCore,
|
|
4
|
-
type ChoroplethChartOptions,
|
|
5
|
-
type ChartTabularData
|
|
6
|
-
} from '@carbon/charts'
|
|
1
|
+
<script>
|
|
2
|
+
import { ChoroplethChart as ChoroplethChartCore } from '@carbon/charts'
|
|
7
3
|
import BaseChart from './BaseChart.svelte'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
options,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
chart = $bindable(),
|
|
9
|
+
onload,
|
|
10
|
+
onupdate,
|
|
11
|
+
ondestroy,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props()
|
|
13
14
|
</script>
|
|
14
15
|
|
|
15
16
|
<BaseChart
|
|
16
|
-
{...$$restProps}
|
|
17
17
|
Chart={ChoroplethChartCore}
|
|
18
18
|
{options}
|
|
19
19
|
{data}
|
|
20
20
|
bind:ref
|
|
21
21
|
bind:chart
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
{onload}
|
|
23
|
+
{onupdate}
|
|
24
|
+
{ondestroy}
|
|
25
|
+
{...rest} />
|
|
@@ -1,32 +1,9 @@
|
|
|
1
|
-
import { ChoroplethChart as ChoroplethChartCore, type ChoroplethChartOptions
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const ChoroplethChart: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
[x: string]: any;
|
|
17
|
-
options: ChoroplethChartOptions;
|
|
18
|
-
data: ChartTabularData;
|
|
19
|
-
chart?: ChoroplethChartCore | undefined;
|
|
20
|
-
ref?: HTMLDivElement | undefined;
|
|
21
|
-
}, {
|
|
22
|
-
load: CustomEvent<null>;
|
|
23
|
-
update: CustomEvent<{
|
|
24
|
-
data: ChartTabularData;
|
|
25
|
-
options: import("@carbon/charts").BaseChartOptions;
|
|
26
|
-
}>;
|
|
27
|
-
destroy: CustomEvent<null>;
|
|
28
|
-
} & {
|
|
29
|
-
[evt: string]: CustomEvent<any>;
|
|
30
|
-
}, {}, {}, string>;
|
|
31
|
-
type ChoroplethChart = InstanceType<typeof ChoroplethChart>;
|
|
32
|
-
export default ChoroplethChart;
|
|
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,24 +1,25 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
CirclePackChart as CirclePackChartCore,
|
|
4
|
-
type CirclePackChartOptions,
|
|
5
|
-
type ChartTabularData
|
|
6
|
-
} from '@carbon/charts'
|
|
1
|
+
<script>
|
|
2
|
+
import { CirclePackChart as CirclePackChartCore } from '@carbon/charts'
|
|
7
3
|
import BaseChart from './BaseChart.svelte'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
options,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
chart = $bindable(),
|
|
9
|
+
onload,
|
|
10
|
+
onupdate,
|
|
11
|
+
ondestroy,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props()
|
|
13
14
|
</script>
|
|
14
15
|
|
|
15
16
|
<BaseChart
|
|
16
|
-
{...$$restProps}
|
|
17
17
|
Chart={CirclePackChartCore}
|
|
18
18
|
{options}
|
|
19
19
|
{data}
|
|
20
20
|
bind:ref
|
|
21
21
|
bind:chart
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
{onload}
|
|
23
|
+
{onupdate}
|
|
24
|
+
{ondestroy}
|
|
25
|
+
{...rest} />
|
|
@@ -1,32 +1,9 @@
|
|
|
1
|
-
import { CirclePackChart as CirclePackChartCore, type CirclePackChartOptions
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const CirclePackChart: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
[x: string]: any;
|
|
17
|
-
options: CirclePackChartOptions;
|
|
18
|
-
data: ChartTabularData;
|
|
19
|
-
chart?: CirclePackChartCore | undefined;
|
|
20
|
-
ref?: HTMLDivElement | undefined;
|
|
21
|
-
}, {
|
|
22
|
-
load: CustomEvent<null>;
|
|
23
|
-
update: CustomEvent<{
|
|
24
|
-
data: ChartTabularData;
|
|
25
|
-
options: import("@carbon/charts").BaseChartOptions;
|
|
26
|
-
}>;
|
|
27
|
-
destroy: CustomEvent<null>;
|
|
28
|
-
} & {
|
|
29
|
-
[evt: string]: CustomEvent<any>;
|
|
30
|
-
}, {}, {}, string>;
|
|
31
|
-
type CirclePackChart = InstanceType<typeof CirclePackChart>;
|
|
32
|
-
export default CirclePackChart;
|
|
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,24 +1,25 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
ComboChart as ComboChartCore,
|
|
4
|
-
type ComboChartOptions,
|
|
5
|
-
type ChartTabularData
|
|
6
|
-
} from '@carbon/charts'
|
|
1
|
+
<script>
|
|
2
|
+
import { ComboChart as ComboChartCore } from '@carbon/charts'
|
|
7
3
|
import BaseChart from './BaseChart.svelte'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
options,
|
|
7
|
+
ref = $bindable(),
|
|
8
|
+
chart = $bindable(),
|
|
9
|
+
onload,
|
|
10
|
+
onupdate,
|
|
11
|
+
ondestroy,
|
|
12
|
+
...rest
|
|
13
|
+
} = $props()
|
|
13
14
|
</script>
|
|
14
15
|
|
|
15
16
|
<BaseChart
|
|
16
|
-
{...$$restProps}
|
|
17
17
|
Chart={ComboChartCore}
|
|
18
18
|
{options}
|
|
19
19
|
{data}
|
|
20
20
|
bind:ref
|
|
21
21
|
bind:chart
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
{onload}
|
|
23
|
+
{onupdate}
|
|
24
|
+
{ondestroy}
|
|
25
|
+
{...rest} />
|
|
@@ -1,32 +1,9 @@
|
|
|
1
|
-
import { ComboChart as ComboChartCore, type ComboChartOptions
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const ComboChart: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
[x: string]: any;
|
|
17
|
-
options: ComboChartOptions;
|
|
18
|
-
data: ChartTabularData;
|
|
19
|
-
chart?: ComboChartCore | undefined;
|
|
20
|
-
ref?: HTMLDivElement | undefined;
|
|
21
|
-
}, {
|
|
22
|
-
load: CustomEvent<null>;
|
|
23
|
-
update: CustomEvent<{
|
|
24
|
-
data: ChartTabularData;
|
|
25
|
-
options: import("@carbon/charts").BaseChartOptions;
|
|
26
|
-
}>;
|
|
27
|
-
destroy: CustomEvent<null>;
|
|
28
|
-
} & {
|
|
29
|
-
[evt: string]: CustomEvent<any>;
|
|
30
|
-
}, {}, {}, string>;
|
|
31
|
-
type ComboChart = InstanceType<typeof ComboChart>;
|
|
32
|
-
export default ComboChart;
|
|
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
|