tvjsx / trading-vue-js

💹 Hackable charting lib for traders. You can draw literally ANYTHING on top of candlestick charts. [Not Maintained]
https://tvjsx.github.io/trading-vue-demo/
MIT License
2.09k stars 638 forks source link

With Live data feed, new bars goes out of visible charts, chart should display newest bar #148

Closed balwinderstock closed 4 years ago

balwinderstock commented 4 years ago

How to reproduce: From Tests: In Play with DataCube in console [7/15]

Leave the chart for live update, after sometime new bars are created out they get out of visible canvas

Expected: Chart should adjust to show the newest bar

image

C451 commented 4 years ago

WIP https://github.com/tvjsx/trading-vue-js/blob/ed73a4e47c946ee6da1af752fe70d9a84bfdf95d/src/helpers/dc_core.js#L471

balwinderstock commented 4 years ago

Thanks, looking forward to it

martinval commented 3 years ago

I was looking for a solution ot this as well and while this is WIP my hack to update the scroll is to reset the chart when I click on it:

add @click.native="onClick" to the main chart comp and

onClick(){
         this.$refs.tradingVue.resetChart()
     },
C451 commented 3 years ago

@martinval should work already, reseting the chart too often is generally a bad practice.