Can multiple qml ChartView widgets share a single LineSeries widget?
-
I'm working on an embedded device that receives and plots data in real time. There are at least 2 different ChartView widgets used to plot exactly the same data. The charts are different sizes and located in different parts of the screen based on what else is being displayed on that screen. Only one of those ChartView widgets will ever be visible at a time. Otherwise the charts display exactly the same lines and data . Not that this should matter much, but in this UI, all the ChartView widgets get "destroyed" at the same time as all the LineSeries widgets (nothing gets deleted/freed till it all gets deleted/freed).
I'd like to have a single LineSeries widget shared between those multiple ChartView widgets, so that I'd only have to maintain the data for that line in a single widget, but I don't think that's possible. I really want to use the ChartView widget because it does everything else that I want it to do. The only solution I can think of for this problem is to use the "createSeries" from each ChartView widget to create multiple instances of LineSeries widgets (one for each chart), and then maintain exact copies of the same data (one for each chart).
Is there another solution that I'm missing?