Financial charts
HLC area
High, low and close drawn as a filled range around the close line.
"use client";
import { ChartCanvas, Pane } from "@reincharts/core";
import { HLCAreaSeries } from "@reincharts/series";
import { Grid, XAxis, YAxis } from "@reincharts/axes";
import { Crosshair } from "@reincharts/coordinates";
import { Legend } from "@reincharts/tooltip";
import { daily } from "@/lib/data";
import { useDocsChartTheme } from "@/lib/use-docs-theme";
export default function HLCArea() {
const theme = useDocsChartTheme();
return (
<ChartCanvas data={daily} theme={theme} barSpacing={6}>
<Pane>
<Grid />
<HLCAreaSeries name="MSFT" />
<YAxis />
<Legend title="MSFT · HLC area" />
</Pane>
<XAxis />
<Crosshair />
</ChartCanvas>
);
}Usage
<HLCAreaSeries />The area between high and close is filled with upColor, the area between close and low with downColor, and the
close is drawn as a line on top. It reads high, low and close by default.