-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
I’m building a candlestick chart using Lightweight Charts and updating the current candle price in real time.
However, I’d like to display the date/time of the current candle below the price label, similar to how TradingView shows it — but currently, there’s no clear way to do that.
I’ve tried:
• Exploring the new plugin/primitive API (Lightweight Charts Next), but couldn’t find a way to draw a label below the price.
• Creating a new LineSeries with:
priceFormat: { type: 'custom', formatter: (price: number) => { return new Date(); }, }, but it didn’t have any effect.
It would be great to have a way (via plugin, primitive, or built-in API) to render a custom label below the current price, showing the corresponding date/time of the candle — just like TradingView does.
Here’s a screenshot example from TradingView showing what I mean:
And this is my demo:
Can anyone help me achieve this? I’d really appreciate any hint or example.