Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

cl_gui_chart_engine Bar chart refresh

Former Member
0 Kudos
341

Hello,

I am using cl_gui_chart_engine to show barchart. But i want to show 10 records at one time. I manage to do the itab and xml data changing part using a button click. But when i use command call method g_ce_viewer->render, it doesn't show the updated records.

Thanks in advance.

2 REPLIES 2

kai_gutenkunst
Active Contributor
0 Kudos
71

Hi,

when updating the data you only call set_data again followed by render?

Or do you erroneously create a new instance of cl_gui_chart_engine once again? I saw such mistakes several times where the old instance wasn't reused and as a consequence several charts were created (all in the same gui container)...

Regards, Kai

Former Member
0 Kudos
71

(okay, I know it's out of date, but might be useful to someone somewhere...)

As KAI said, it's not advisable to re-render or repetitively create the viewer object.

If you just re-use the existing container+object, and recall the method to set the graph:

***

g_ce_viewer->set_data( xdata = data_xml ).

***

with your new data.

In my transaction, we use this to monitor Material Usage. When the user dclicks a material in the list in an ALV grid, an event gets triggered, that researches the Material Usage for that Material, reuses the XML Transformations, then we set the data on the graph. This means that the objects don't get recreated, but the data presented to the user changes.

Edited by: PatrickFontDean on Sep 14, 2011 5:55 PM