As per the documentation, using unsubscribeCrosshairMove
allows us to remove a handler that was previously added with subscribeCrosshairMove
. Our objective is to use unsubscribe...
to eliminate previous handlers before re-subscribing with subscribe...
after updating seriesData. The current code snippet seems to be having trouble properly unsubscribing, possibly due to the syntax used in subscribe...
to access the event data using e
. Is there a way to retain access to the event data through e
while enabling proper usage of unsubscribe...
? #tradingview
this.mainChart.unsubscribeCrosshairMove(this.subCrossAndSync());
this.mainChart.subscribeCrosshairMove((e) => this.subCrossAndSync(e, this.midChart, seriesData));