DocsChartsFinancial
CandlestickVolumeChart
React example follows below.
ts
import { CandlestickVolumeChart } from "@grassroot/charts-react"; const ohlc = [ { id: "jan-01", date: "2026-01-01", open: 12, high: 18, low: 10, close: 16, volume: 120 }, { id: "jan-02", date: "2026-01-02", open: 16, high: 20, low: 13, close: 14, volume: 90 }, { id: "jan-03", date: "2026-01-03", open: 14, high: 22, low: 12, close: 21, volume: 160 },]; <CandlestickVolumeChart data={ohlc} />ts
<script setup lang="ts">import { CandlestickVolumeChart } from "@grassroot/charts-vue"; const ohlc = [ { id: "jan-01", date: "2026-01-01", open: 12, high: 18, low: 10, close: 16, volume: 120 }, { id: "jan-02", date: "2026-01-02", open: 16, high: 20, low: 13, close: 14, volume: 90 }, { id: "jan-03", date: "2026-01-03", open: 14, high: 22, low: 12, close: 21, volume: 160 },];</script> <template> <CandlestickVolumeChart :data='ohlc' /></template>ts
import { ChangeDetectionStrategy, Component } from "@angular/core";import { GrassrootCandlestickVolumeChart } from "@grassroot/charts-angular"; @Component({ selector: "app-candlestick-volume-chart-chart-demo", standalone: true, imports: [GrassrootCandlestickVolumeChart], changeDetection: ChangeDetectionStrategy.OnPush, template: `<grassroot-candlestick-volume-chart [data]='ohlc' />`,})export class CandlestickVolumeChartDemoComponent { readonly ohlc = [ { id: "jan-01", date: "2026-01-01", open: 12, high: 18, low: 10, close: 16, volume: 120 }, { id: "jan-02", date: "2026-01-02", open: 16, high: 20, low: 13, close: 14, volume: 90 }, { id: "jan-03", date: "2026-01-03", open: 14, high: 22, low: 12, close: 21, volume: 160 }, ];} export default CandlestickVolumeChartDemoComponent;ts
<script lang="ts"> import { CandlestickVolumeChart } from "@grassroot/charts-svelte"; const ohlc = [ { id: "jan-01", date: "2026-01-01", open: 12, high: 18, low: 10, close: 16, volume: 120 }, { id: "jan-02", date: "2026-01-02", open: 16, high: 20, low: 13, close: 14, volume: 90 }, { id: "jan-03", date: "2026-01-03", open: 14, high: 22, low: 12, close: 21, volume: 160 }, ];</script> <CandlestickVolumeChart data={ohlc} />ts
/** @jsxImportSource solid-js */import { CandlestickVolumeChart } from "@grassroot/charts-solid"; const ohlc = [ { id: "jan-01", date: "2026-01-01", open: 12, high: 18, low: 10, close: 16, volume: 120 }, { id: "jan-02", date: "2026-01-02", open: 16, high: 20, low: 13, close: 14, volume: 90 }, { id: "jan-03", date: "2026-01-03", open: 14, high: 22, low: 12, close: 21, volume: 160 },]; export default function CandlestickVolumeChartDemo() { return <CandlestickVolumeChart data={ohlc} />;}Installation
bash
pnpm dlx grassroot add chart/candlestick-volume-chartbash
npx grassroot@latest add chart/candlestick-volume-chartbash
yarn dlx grassroot add chart/candlestick-volume-chartbash
bunx grassroot add chart/candlestick-volume-chartAPI Reference
| Prop | Type | Default |
|---|---|---|
datarequired | readonly OhlcDatum[] | — |