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: 

how to get Size of chart

arvind_patel3
Explorer
0 Kudos

Hi All,

I am using method CL_GUI_BARCHART->create_chart to create the chart on screen and passing parameter "SIZE" to define its height.

is there any way to get the current size of this chrat so that when user leave the application, I can store this value in table and next time when he opens the application, this stored value can be set back.

User wants to retain the layout changes for next subsequent times he logs in.

Please help.

Thanks & regards,

Arvind Patel

7 REPLIES 7

bauert
Explorer
0 Kudos

Hi,

maybe you can use the Method get_height of class cl_gui_control.

cl_gui_barchart is a subclass of cl_gui_control.

regards.

0 Kudos

Hi Thomas and Anjan,

I already tried this method. this is not returning any value. i  am able to get width of column by "settings" parameter of GRAPHIC_PAI method but not height.

Thanks & Regards,

Arivnd Patel

0 Kudos

Hi,

have you tried something like this:

DATA lo_barc_control TYPE REF TO cl_gui_barchart.

DATA lo_gui_control TYPE REF TO cl_gui_control.

DATA lv_height TYPE i.

lo_barc_control->get_parent( IMPORTING parent = lo_gui_control ).

lo_gui_control->get_height( IMPORTING height = lv_height ).

Thx.

0 Kudos

Yeah Thomas, This also did not work. However i dont want to get the height of parent control, i have 3 barcharts (gantt) on same screen and want to get the height of each one to set in the next run.

Thanks & Regards,

Arvind Patel

anjaneya_bhardwaj2
Contributor
0 Kudos

you may call get_height as this gets inherited from the generic cl_gui_control class .But I think it will give the height of the container GRAPH instead of actual Bar.

Anjan

0 Kudos

Hi,

     use the method SET_HEIGHT to set the height of the graph, then use get_height,it will return the value.

Hope this helps.

0 Kudos

Hi Sundar,

SET_HEIGHT is not working. whatever the size passed in Creat_chart method is what being reflected on screen. I called set_height method after creat_chart method with different height, but its not getting reflected.

Get_height still did not return any value.

thanks & Regards,

Arvind