DocsChartsSpecialty
WordCloudChart
React example follows below.
ts
import { WordCloudChart } from "@grassroot/charts-react"; <WordCloudChart words={[{ text: "gpu", value: 14 }, { text: "fallback", value: 8 }, { text: "svg", value: 6 }]} />ts
<script setup lang="ts">import { WordCloudChart } from "@grassroot/charts-vue";</script> <template> <WordCloudChart :words='[{ text: "gpu", value: 14 }, { text: "fallback", value: 8 }, { text: "svg", value: 6 }]' /></template>ts
import { ChangeDetectionStrategy, Component } from "@angular/core";import { GrassrootWordCloudChart } from "@grassroot/charts-angular"; @Component({ selector: "app-word-cloud-chart-chart-demo", standalone: true, imports: [GrassrootWordCloudChart], changeDetection: ChangeDetectionStrategy.OnPush, template: `<grassroot-word-cloud-chart [words]='[{ text: "gpu", value: 14 }, { text: "fallback", value: 8 }, { text: "svg", value: 6 }]' />`,})export class WordCloudChartDemoComponent { } export default WordCloudChartDemoComponent;ts
<script lang="ts"> import { WordCloudChart } from "@grassroot/charts-svelte";</script> <WordCloudChart words={[{ text: "gpu", value: 14 }, { text: "fallback", value: 8 }, { text: "svg", value: 6 }]} />ts
/** @jsxImportSource solid-js */import { WordCloudChart } from "@grassroot/charts-solid"; export default function WordCloudChartDemo() { return <WordCloudChart words={[{ text: "gpu", value: 14 }, { text: "fallback", value: 8 }, { text: "svg", value: 6 }]} />;}Installation
bash
pnpm dlx grassroot add chart/word-cloud-chartbash
npx grassroot@latest add chart/word-cloud-chartbash
yarn dlx grassroot add chart/word-cloud-chartbash
bunx grassroot add chart/word-cloud-chartAPI Reference
| Prop | Type | Default |
|---|---|---|
wordsrequired | readonly WordCloudDatum[] | — |