DocsChartsHierarchy
BubblePackChart
React example follows below.
ts
import { BubblePackChart } from "@grassroot/charts-react"; const hierarchy = { label: "portfolio", children: [ { label: "Platform", value: 18 }, { label: "Product", children: [{ label: "Charts", value: 12 }, { label: "Catalog", value: 7 }] }, ],}; <BubblePackChart root={hierarchy} />ts
<script setup lang="ts">import { BubblePackChart } from "@grassroot/charts-vue"; const hierarchy = { label: "portfolio", children: [ { label: "Platform", value: 18 }, { label: "Product", children: [{ label: "Charts", value: 12 }, { label: "Catalog", value: 7 }] }, ],};</script> <template> <BubblePackChart :root='hierarchy' /></template>ts
import { ChangeDetectionStrategy, Component } from "@angular/core";import { GrassrootBubblePackChart } from "@grassroot/charts-angular"; @Component({ selector: "app-bubble-pack-chart-chart-demo", standalone: true, imports: [GrassrootBubblePackChart], changeDetection: ChangeDetectionStrategy.OnPush, template: `<grassroot-bubble-pack-chart [root]='hierarchy' />`,})export class BubblePackChartDemoComponent { readonly hierarchy = { label: "portfolio", children: [ { label: "Platform", value: 18 }, { label: "Product", children: [{ label: "Charts", value: 12 }, { label: "Catalog", value: 7 }] }, ], };} export default BubblePackChartDemoComponent;ts
<script lang="ts"> import { BubblePackChart } from "@grassroot/charts-svelte"; const hierarchy = { label: "portfolio", children: [ { label: "Platform", value: 18 }, { label: "Product", children: [{ label: "Charts", value: 12 }, { label: "Catalog", value: 7 }] }, ], };</script> <BubblePackChart root={hierarchy} />ts
/** @jsxImportSource solid-js */import { BubblePackChart } from "@grassroot/charts-solid"; const hierarchy = { label: "portfolio", children: [ { label: "Platform", value: 18 }, { label: "Product", children: [{ label: "Charts", value: 12 }, { label: "Catalog", value: 7 }] }, ],}; export default function BubblePackChartDemo() { return <BubblePackChart root={hierarchy} />;}Installation
bash
pnpm dlx grassroot add chart/bubble-pack-chartbash
npx grassroot@latest add chart/bubble-pack-chartbash
yarn dlx grassroot add chart/bubble-pack-chartbash
bunx grassroot add chart/bubble-pack-chartAPI Reference
| Prop | Type | Default |
|---|---|---|
rootrequired | HierarchyDatum | — |