Yes so some changes, both visual and under the hood have come together to make the overall experience smoother and more useful, whilst also improving the developer experience.
One issue we wanted to tackle was to reduce the amount of overlap between the candles and the volume bars, which at times was making it tricky to see differences in volume.
The zoom and pan experience has also been improved as we now pre-fetch candles on the fly to ensure you are never waiting for candles to load. The pan event from D3 can be called several times per second so we throttle it to avoid over fetching. Additionally, we fixed an issue where we were still holding candle data in memory even if that candle was out of view. This resulted in the memory usage of the chart continually growing, which could eventually lead to a slow down in performance if you left the tab open for too long.
This iteration of the candlestick chart saw us make a full switch to using react hooks, which really improved the developer experience by making the code more declarative and maintainable. It also resulted in less lines of code.
We also improved performance by splitting out different components of the chart into individual canvas elements. For example, the crosshair is something that draws with every movement of the mouse, which can be easily 100 times a second so we added a separate canvas element specifically for drawing the crosshair, which avoids unnecessarily drawing other parts of the chart such as the candles or axes.
Overall we’ve been really happy with the changes and expect to deploy these to testnet over the coming weeks. That said we are striving to keep improving in this area and one of our stretch goals for 2020 is to start introducing more customisation, particularly with regard to chart indicators such as Bollinger bands and Ichimoku clouds. We are aiming to expand the controls in the chart navigation, allowing you to select what indicators to display and to save them to your browser’s local database (IndexedDB). However, we would also like to do further optimisation of the API itself, which will help us better manage the candle data.
If you’re an API user I’d love to hear what you like or dislike about it as we want to make 3rd party chart integrations as easy as possible.