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