vegaprotocol / pennant

A charting library for Vega Console
https://pennant.vega.xyz
MIT License
25 stars 8 forks source link

Candle rendering problem when zooming #898

Open mattrussell36 opened 1 year ago

mattrussell36 commented 1 year ago

Discussed in https://github.com/vegaprotocol/feedback/discussions/149

Originally posted by **Osthumus** July 31, 2023 ### Problem encountered candlestick in chart blurs out sometimes when zooming in and out ### Observed behaviour candlestick blurs out ### Expected behaviour normal candlestick chart ### Steps to reproduce ```bash 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. Observe the error ... ``` ### Public key _No response_ ### Network affected Mainnet ### System information windows 11 ### Screenshots and videos ![Screenshot 2023-08-01 034107](https://github.com/vegaprotocol/feedback/assets/122043524/8dd5dac5-331f-411d-9458-2e7d174624ed)
johnwalley commented 1 year ago

First thought is that it looks like the price data we are rendering is more frequent than expected, i.e. assuming the candle width is correct then we have too much data (or vice versa, correct data but the candle width is wrong).

For example, here is the result of providing 5m data but telling the chart that is it 1h data.

Screenshot 2023-08-01 at 14 00 59

What is also curious is that the small section of volume we can see looks unaffected. However, I wonder if we had the full screenshot would it show too many smaller volume bars in the same way we see too many candles in the main view.

It would help to have the x-axis to know how the selected 15m interval lines up with the candles.