976 views
in GUI Development by
Dear Manfred,

I use Bar Chart to view total temperature of 365 days. But graph is outside of screen. How can i use touch screen with horizontal to view days ?

Thanks you very much

1 Answer

+1 vote
by

Please have a look into the attached example 'ScrollBarGraph' (download example project) - it demonstrates the usage and the combination of the classes Core::Outline, Core::SlideTouchHandler and Charts::BarChart.


As soon as the bar chart contains a huge number of data values (provided by using the class Charts::RecordList), the content of the BarChart should be slided horizontally by the user.
For this purpose, the BarChart is embedded into an Outline object. It is important that the property 'Embedded' of the BarChart is set to 'true' and that the BarChart is lying directly above the Outline object (Z-order).
The embedded BarChart is now limited to the area of the Outline object and the Outline takes care for the arrangement and the scrolling of its embedded content.
The Outline is connected to SlideTouchHandler that receives the slide gestures from the user.
When you press the button, a new set of data records is generated and transferred to the BarGraph.

I hope this answers your question.

 

by
Dear Manfred,

Thanks you very much
by

Dear Manfred,

How can I create recordlist and show with value is temperature corresponding days and time as picture below ? 

Thanks you very much.

by

I assume you are looking for a solution that displays a bar graph with a value text above the bar and a day text below the bar.

In this case, it might be better to create your own bar class, that displays a rectangle, a value text and the date/time text.

Please have a look to the attached sample application 'TemperatureHistory' (download example project).

This example implements a simple history list to show the temperature values of the past 30 days as bar graph with text items. The single bar graph items are implemented within the class Application::HistoryItem.
The entire graph is implemented within the class Application::HistoryList - it demonstrates the usage and the combination of the classes Core::SlideTouchHandler and Core::HorizontalList to create a scrollable list with customizable items.

Feel free to adapt the sample to your needs...

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

...