useLastYValue: (chart: ChartInstance, seriesId: string) => number | nullReactive snapshot of the most-recent Y value for a series. Tracks the smoothed value used by <YLabel>, so values animate consistently with the price badge.
import { useChartInstance, useLastYValue } from '@wick-charts/react'; function PriceBadge({ seriesId }: { seriesId: string }) { const chart = useChartInstance(); const last = useLastYValue(chart, seriesId); if (last === null) return null; return <span className="badge">${last.toFixed(2)}</span>;}