on 08-28-2009 7:15 AM
Dear All,
How to change the business graph chart type dynamically in the code.
Please help me.
Regards,
Arun
Hi,
Create a context attribute CHART_TYPE of type WDUI_BGTYPE.
And set the type of chart you want by setting this attribute.
lv_chart = '01'. "Bar type
wd_context->set_attribute
exporting
name = 'CHART_TYPE'
value = lv_chart.
Regards,
Lekha.
Edited by: Lekha on Aug 28, 2009 11:57 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is this the dynamic BG element that is getting generated.
Bind the Chart type of BG to this context attribute. If you want to use it globbaly then create this under a node in the
compoennet controller.
How many views are there. Are you giving any input based on which you are trying to show BG.
You can write it either in WDODINIT or HANDLER for Plugs.
Regards,
Lekha.
Hi,
I have one view,when dropdown is changed the BG should change the chart type.
I have done the code for change the Attribute "CHART_TYPE". but i could not assign the chart_type attribute into
CHART TYPE property in GRAPH control. is there any code to get the GRAPH control and assign the attribute?.
Regards,
Arun
Hi,
There is no direct binding possible for chart type property of BG. So you need to do that using its handler as follows:
DATA: lr_view_elem TYPE REF TO if_wd_view_element,
lr_bg TYPE REF TO cl_wd_business_graphics,
l_chart_type TYPE WDUI_BGTYPE.
***Changing Customizing file for BG depending on graph
IF wd_this->gr_view IS NOT INITIAL. "Get global view controller from WDDOMODIFY method
***Get Business graphic element from view
CALL METHOD wd_this->gr_view->get_element
EXPORTING
id = 'BG_TEST' "Name of Business graph UI element
RECEIVING
element = lr_view_elem.
***Get Business graphic element object
lr_bg ?= lr_view_elem.
l_chart_type = '02'. "Columns
lr_bg->SET_CHART_TYPE( l_chart_type ).
endif.
Thanks,
Tejaswini
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.