suiss/ui · Chart
Tooltip Chart Line
A stacked bar chart whose tooltip marks each series with a thin vertical color bar.
Tooltip Chart Line is an open-source chart from suiss/ui for React. The @esuiss/ui CLI copies its source into your project, so you own the code.
A stacked bar chart that shows the line tooltip indicator, a thin vertical bar in each series' color. It reads cleanly in dense tooltips and pairs well with line and area charts.
Installation
CLI
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Manual
- Install the dependencies:
-
Copy the source into
components/charts/tooltip-chart-line.tsx:
- Update the import paths to match your project.
Usage
Set indicator on ChartTooltipContent to line. Replace chartData and the series in chartConfig with your own.
Notes
The tooltip opens on a preset month when the chart loads; remove defaultIndex if it should start hidden.