Create a LiveValue seeded at initial. Hold the returned object, call .set(v) from your data source, and hand it to <YAxisIndicator source={…}> — the pill repositions and relabels on each set without re-rendering the chart.
initial
.set(v)
<YAxisIndicator source={…}>
set
const price = createLiveValue(0);ws.onmessage = (e) => price.set(JSON.parse(e.data).last); // outside React// <YAxisIndicator source={price} color="#4af" format=",.2f" /> Copy
const price = createLiveValue(0);ws.onmessage = (e) => price.set(JSON.parse(e.data).last); // outside React// <YAxisIndicator source={price} color="#4af" format=",.2f" />
Create a LiveValue seeded at
initial. Hold the returned object, call.set(v)from your data source, and hand it to<YAxisIndicator source={…}>— the pill repositions and relabels on eachsetwithout re-rendering the chart.