689 views
in GUI Development by
Hello. I'm trying to make something like "Climatic Cabinet" demo using Graph. And i can't figure out how to add more then 1 line. Thanks.

1 Answer

+1 vote
by
 
Best answer

Hello,

if you are talking about something like the "Climatic Cabinet" demo, then it might be better to work with the class Charts::LineChart instead of the class Charts::Graph.

A good starting point for working with the class Charts::LineChart is the example "ChartsDemo". If you prefer working with the class Charts::Graph, then have a look into the example "WaveformGenerator".

If your question "how to add more then 1 line" means, how to show several graphs within one diagramm, then you can place several Graph objects over each other - everyone is displaying one curve. In this case, the background color and the grid lines of all overlapping charts should be set to transparent.

I hope this answers your question.

The following example (taken from the "Vehicle Data Logger" demo application) shows this idea:

 

by
Thanks, that helped. Two more questions. I tried Charts::LineChart class but it looks like it doesn't support vertical grid lines, does it? And is there any way to name those grid lines, like it's made in "Climatic Cabinet" demo. I mean "20, 40, 60, °C, etc."?
by
You can place additional views like Views::Line or Views::Text into your chart in order to add additonal lines and description text items.

This gives you the possibility to place the text where you want, to choose the font that you want, or to add additonal icons...
by
Hello

Where can i find a example on LineChart ??
I can't find that ChartsDemo that you refer to

best regards
Håkan
by

Hello,

the Vehicle Data Logger will be part of the provided examples in one of the next versions. At the moment it is not completely cleaned and documented. Nevertheless, you can download the current version and adapt it according your needs.

Best regards,

Manfred

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...