Chart Tooltip
The tooltip and crosshair kit on real charts.
$149 once · every Pro piece
A raised panel follows the crosshair on a lazier spring, tweens its size when the content changes, flips at the edges and scale-fades in and out. Crosshairs come solid, dashed or as a gradient, fading at both ends; a finance crosshair tracks the pointer's height with a rolling value pill on the y axis; the date pill on the x axis rolls its digits while axis labels step aside. Dots ride the line with a halo or a ring. Bars keep the dots and the panel without a line, and three sparklines share one store so their crosshairs and readouts move together. Nothing re-renders while the pointer moves.
Install
npx shadcn@latest add @obsyde/chart-tooltipNeeds your licence key · Get Pro
Usage
Import it from where the CLI puts it, or copy the files below by hand.
import { ChartTooltipDemo } from '@/components/obsyde/ember/chart-tooltip/ChartTooltipDemo';
export function Example() {
return (
<ChartTooltipDemo view="panel" />
);
}
Files
What you get with Pro: plain React, TypeScript and CSS, with no dependencies.
ember/chart-tooltip/ChartTooltipDemo.tsxcomponentember/chart-tooltip/chart-tooltip.cssstylesember/viz-kit/viz-kit.csssharedember/viz-kit/Tooltip.tsxsharedember/viz-kit/focus.tssharedember/viz-kit/patterns.tsxsharedember/viz-kit/roll.tssharedember/shared/rolling-number.csssharedember/shared/spring.tssharedember/shared/accent.tssharedember/viz-kit/scale.tssharedember/viz-kit/motion.tssharedember/viz-kit/chart.tsxsharedember/shared/ember.csssharedember/viz-kit/touch.tssharedember/viz-kit/keyboard.tssharedember/viz-kit/size.tssharedember/viz-kit/shape.tssharedember/viz-kit/series.tsxsharedember/viz-kit/Legend.tsxsharedember/viz-kit/Grid.tsxsharedember/viz-kit/demo.tsxsharedember/viz-kit/demo.csssharedember/viz-kit/Axis.tsxshared
API
| Prop | Type | Default |
|---|---|---|
accentAccent | 'ember' | 'volt' | 'arc' | 'ember' |
viewView | 'panel' | 'corner' | 'finance' | 'bars' | 'synced' | 'panel' |
tooltipTooltip | 'panel' | 'corner' | 'none' | 'panel' |
crosshairCrosshair | 'solid' | 'dashed' | 'gradient' | 'none' | 'solid' |
dotsDots | 'halo' | 'ring' | 'none' | 'halo' |
glowDot glow | boolean | false |
followPanel follow | 'lazy' | 'crosshair' | 'lazy' |
snapSnap to rows | boolean | true |
curveCurve | 'monotone' | 'linear' | 'catmull' | 'step' | 'monotone' |
revealReveal | 'sweep' | 'cool' | 'rise' | 'fade' | 'none' | 'sweep' |
backgroundBackground | 'grid' | 'dots' | 'none' | 'grid' |
pointsPoints | number | 30 |
seedSeed | number | 3 |