leeoniya / uPlot

📈 A small, fast chart for time series, lines, areas, ohlc & bars
MIT License
8.51k stars 371 forks source link

[Query] showing last value at end #885

Closed sreeramu closed 6 months ago

sreeramu commented 6 months ago

Hello, Is there is any way to achieve this functions with plugin. Screenshot 2023-10-26 at 11 36 59 PM

Need to display the last value of the line at the end of the chart.

Thanks.

leeoniya commented 6 months ago

yes it's possible, but probably needs extra logic to avoid overlap when the values are similar.

it is probably easier to just move the y axis to the right side. (or make a duplicate axis on the right side)

you can also use the legend to display the most recent value when nothing is being hovered.

sreeramu commented 6 months ago

yes it's possible, but probably needs extra logic to avoid overlap when the values are similar.

it is probably easier to just move the y axis to the right side. (or make a duplicate axis on the right side)

you can also use the legend to display the most recent value when nothing is being hovered.

Thanks @leeoniya for good suggestions, any reference for achieving this "you can also use the legend to display the most recent value when nothing is being hovered."

leeoniya commented 6 months ago

see the source of this demo: https://leeoniya.github.io/uPlot/demos/area-fill.html

sreeramu commented 6 months ago

Thanks , will close this issue.