2023-08-24 05:40 AM
Hello, I'm using a dynamic graph for a project. Can I display 2 different sets of data on this graph? Using 2 separate graphs doesn't solve my problem since I need them to be on the same graph.
2023-08-24 08:17 AM
Hello @amorftor,
Do you mean you want to use only one graph widget? or do you want to show one graph?
With touchgfx, you can easily show multiple sets of data in one graph, but you must use multiple graph widgets (as they're only matching with 1 set of data). For example, with the graph example we provide in TouchGFX, I copied the graph widget and modified it a little bit in the code to make it look like this :
Let me know if it's what you want to realize.
2023-08-24 08:27 AM
I wanted to show only 1 widget. Normally, I show the data using 2 graphs, but when I need to autoscale on the y-axis, the ratios of the 2 graphs change and I can't get proper results.
2023-08-24 08:29 AM
When I read the touchgfx docs, it seems like 2 data cannot be processed into 1 chart.
2023-08-25 03:01 AM
Hello @amorftor ,
I see. Then I would use the autoscale for only one of the 2 graphs, and the other one should use the scale defined by the first one using the getScale() and setScale() functions. For the range of your second graph, you should also use the range of your first graph using the getGraphRange() and setGraphRange() functions. In that way, you could draw only one graph with 2 sets of data that have the same scale and range.
2023-08-25 06:03 AM
Do you have an example on how to do this?
demek istediğini anladım fakat nasıl yazacağımı bilemedim. İlgin için teşekkür ederim. Bilerek türkçe yazıyorum.