How can I display the closing price of the last candle stick. I’m trying to imeplement the feature simlar to trading view. There is a line which goes from x = 0 till the end of the graph connecting the close price on the last candle and displays the latest price. I’m able to add “line” shape but would like to add price as well. How can I do it?
Hi @ak2405 you could use an annotation. Just get the y value to the last data point on the x axis. Here an example (similar to what you want to do)
Thanks @AIMPED, I added annotations to the line shape and it working as expected. But with hover data, its only displaying the values when its on the data point. Is it possible to display y-axis values even if there is no data there?
Hi, I’m not sure if I understand you correctly. You want to add one fixed annotation which displays the y value for the last data point on the x-axis, right?
I was able to add “line” shape and annotations as you suggested to display the last price. But the cursor is only displaying the hover data. If I move the cursor to a point outside the candles area, it still displays the candle OHLC (Open, High, Low, Close) values.
In the above screenshot, the cursor’s y-axis value is 27064 (highlighted in black), even though candle high price is different. How to achieve the same in dash plotly? Also, is there a way to change location of hover data box/template to display at the top of the chart. In the screenshot above, OHLC values are displayed at the top.