I got a groups of charts on my page and when the callback for chart.timeScale().subscribeVisibleTimeRangeChange
goes off, I need to know what chart exactly fired the event.
The callback's params got only raw time range bounds without any info about the event's origin. Is there anything I'm missing? Or this is just impossible to achieve? Thaanks!
The library doesn't provide this information in the callback, but you can handle it from your side easily by binding a chart to the callback, for example:
chart.timeScale().subscribeVisibleTimeRangeChange(callback.bind(null, chart));
Alternatively you could wrap a callback function with another function and pass an argument to it:
chart.timeScale().subscribeVisibleTimeRangeChange((...args) => callback(chart, ...args);