Display and Handle 9 Charts efficiently
-
Hi,
I had the following question.
So far I worked a decent amount with Qt Creator and Widgets but now starting with Qt Quick and QML.
I want to do a GUI with 9 charts and update them alltogether with a new value on a regular time base.
I saw that Qt Quick offers the "Repeater" object which can make copys of Items, so that one template for an item is created and then the item can displayed for example 9 times with the Repeater.
Would a similar approach be possible with the ChartView Class so that a template for one chart would be generated and then 9 charts can be created in a grid from that template ?
My main problem is how every chart could receive an individual id in that case so that each chart can be updated with different values.
Many Greetings -
Hi,
I had the following question.
So far I worked a decent amount with Qt Creator and Widgets but now starting with Qt Quick and QML.
I want to do a GUI with 9 charts and update them alltogether with a new value on a regular time base.
I saw that Qt Quick offers the "Repeater" object which can make copys of Items, so that one template for an item is created and then the item can displayed for example 9 times with the Repeater.
Would a similar approach be possible with the ChartView Class so that a template for one chart would be generated and then 9 charts can be created in a grid from that template ?
My main problem is how every chart could receive an individual id in that case so that each chart can be updated with different values.
Many Greetings@Stronkbert said in Display and Handle 9 Charts efficiently:
Repeater
Column { Repeater { model: ["id1", "id2", "id3"] Text { id: modelData text: : "Data:" + modelData } } } -
Ok I will try to precise my question:
Row { Repeater { model: 3 Rectangle { width: 100; height: 40 border.width: 1 color: "yellow" } } }This is the Repeater Example from the Documentation, it builds 3 rectangles.
What I want to do is this:
Row { Repeater { model: 9 ChartView { ................ ...................... ................ } } }The result should be 9 charts with x and y axis each in the window, but I dont know how exactly it can be done, and all attemtps didn't work.
If I add the hint of "JoeCFD" it would be rather like:
Row { Repeater { model: ["id1", "id2", "id3", "id4", "id5", "id6", "id7", "id8", "id9"] ChartView { ................ ...................... ................ } } }But also with this method to give the ids it doesnt work. "Doesn't work" means the window remains empty.