Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8082

Buisness graphics dynamic PIE chart event id

$
0
0

HI all,

 

I'm trying to create dynamic PIE chart :

 

Link to sdn document *

 

First I declared in the context node a table ( 0…n )

 

PIE – 0…N  with attributes :

 

Categorty – type string

Series – type i

 

 

Then I'm creating the business graphics :

 

DATA:lr_graph TYPE REF TO cl_wd_business_graphics,

lr_cat TYPE REF TO cl_wd_category,

lr_series TYPE REF TO cl_wd_simple_series,

lr_container TYPE REF TO cl_wd_uielement_container,

lr_flow TYPE REF TO cl_wd_flow_data.

lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).

lr_graph = cl_wd_business_graphics=>new_business_graphics(

bind_series_source = 'NODE_DYN'

chart_type = cl_wd_business_graphics=>e_chart_type-pie

height = 340

width = 750

id = 'GRAPH' ).

 

lr_flow = cl_wd_flow_data=>new_flow_data( element = lr_graph ).

 

lr_container->add_child( lr_graph ) .

wd_this->value_cs ?= lr_graph.

wd_this->mr_view ?= view.

 

Now I'm creating the category and series :

wd_this->value_cs =? Lr_graph

wd_this->mr_view ?= view.

 

Series :

DATA: lr_bgr_ss TYPE REF TO cl_wd_simple_series.

lr_bgr_ss = cl_wd_simple_series=>new_simple_series(

bind_value = ‘NODE_DYN.SERIES’

label = ‘Series_1’

event_id = ‘Series_1’

id       = ‘Series_1’

view = wd_this->mr_view ).

Wd_this->value_cs->add_series( lr_bgr_ss ).

Category :

DATA: lr_bgr_cs TYPE REF TO cl_wd_category.

lr_bgr_cs = cl_wd_category=>new_category(

view = wd_this->mr_view

event_id = ‘Series_1’

id       = ‘Series_1’

bind_description = 'NODE_DYN.CATEGORY').

wd_this->value_cs->set_category( lr_bgr_cs ).

 

Now I'm binding the data :

 

Data : ls_pie type wd_this->element_pie.

Data : lt_pie type table of element_pie.

 

ls_pie-category = 'test_category1'.

ls_pie-series = '34'.

Append ls_pie to lt_pie.

 

ls_pie-category = 'test_category2'.

ls_pie-series = '73'.

Append ls_pie to lt_pie.

 

 

Data : lo_nd_pie type ref to if_Wd_context_node.

Data : lo_el_pie type ref to if_wd_context_element.

 

Lo_nd_pie = wd_context->get_child_node(

Name = wd_this-> wdctx_pie.

 

The above is the only way that I succeeded to create 2 categories for the pie chart but I cant isolate the event id for every category.

 

I tried also to create another series with the same id and other event id but still got the same problem.

 

Please suggest a solution for creating dynamic pie chart with event id for every category or series .

 

Regards,

Arie.


Viewing all articles
Browse latest Browse all 8082

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>