forked from carbon-design-system/carbon-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release - feat(svelte): add TypeScript definitions for BoxplotChart, …
…WordCloudChart carbon-design-system#963 (carbon-design-system#1003) Closes carbon-design-system#963 Co-authored-by: natashadecoste <natasha.decoste@gmail.com>
- Loading branch information
1 parent
2affd4b
commit 83efddd
Showing
5 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<script lang="ts"> | ||
import { BoxplotChart } from '../types'; | ||
import type { BoxplotChart as BC } from '@carbon/charts'; | ||
import { | ||
simpleBoxplotData as data, | ||
simpleBoxplotOptions, | ||
} from '@carbon/charts/demo/data'; | ||
let chart: BC = null; | ||
let ref = null; | ||
const options = simpleBoxplotOptions as any; | ||
</script> | ||
|
||
<BoxplotChart | ||
bind:chart | ||
bind:ref | ||
on:load={(e) => { | ||
console.log(e.detail); | ||
}} | ||
on:update={(e) => { | ||
console.log(e.detail); | ||
}} | ||
on:destroy={(e) => { | ||
console.log(e.detail); | ||
}} | ||
{data} | ||
{options} | ||
/> | ||
|
||
<svelte:component | ||
this={BoxplotChart} | ||
on:load={(e) => { | ||
console.log(e.detail); | ||
}} | ||
on:update={(e) => { | ||
console.log(e.detail); | ||
}} | ||
on:destroy={(e) => { | ||
console.log(e.detail); | ||
}} | ||
{data} | ||
{options} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<script lang="ts"> | ||
import { WordCloudChart } from '../types'; | ||
import type { WordCloudChart as WC } from '@carbon/charts'; | ||
import { | ||
wordCloudData as data, | ||
wordCloudOptions, | ||
} from '@carbon/charts/demo/data'; | ||
let chart: WC = null; | ||
let ref = null; | ||
const options = wordCloudOptions as any; | ||
</script> | ||
|
||
<WordCloudChart | ||
bind:chart | ||
bind:ref | ||
on:load={(e) => { | ||
console.log(e.detail); | ||
}} | ||
on:update={(e) => { | ||
console.log(e.detail); | ||
}} | ||
on:destroy={(e) => { | ||
console.log(e.detail); | ||
}} | ||
{data} | ||
{options} | ||
/> | ||
|
||
<svelte:component | ||
this={WordCloudChart} | ||
on:load={(e) => { | ||
console.log(e.detail); | ||
}} | ||
on:update={(e) => { | ||
console.log(e.detail); | ||
}} | ||
on:destroy={(e) => { | ||
console.log(e.detail); | ||
}} | ||
{data} | ||
{options} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { BoxplotChart as BC } from "@carbon/charts"; | ||
import type { BoxplotChartOptions } from "@carbon/charts/interfaces"; | ||
import BaseChart from "./BaseChart"; | ||
|
||
export default class BoxplotChart extends BaseChart<BC, BoxplotChartOptions> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { WordCloudChart as WC } from "@carbon/charts"; | ||
import type { WorldCloudChartOptions } from "@carbon/charts/interfaces"; | ||
import BaseChart from "./BaseChart"; | ||
|
||
export default class WordCloudChart extends BaseChart<WC, WorldCloudChartOptions> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters