cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a pie chart in web dynpro application.

Former Member
0 Kudos

Hi,

I have created a web dynpro application. Now i want to embed a pie chart in that. For that I have inserted a business graphics child in a view and set the chart type as <b>pie</b>. Now to view the chart atleast some dummy value needs to be set, which is done in the wdDoInit() method of the corresponding view. Can anybody help me to write the code in the wdDoInit() method which will populate the pie chart.

Regards,

SM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Soumen,

Try out his sample code:

<b>IPrivate<ur view name>.I<ur node element> categoryElement;

for (int i = 0; i < 10; i++) {

categoryElement = wdContext.create<ur node element>();

categoryElement.setCategoryText("C" + i);//

categoryElement.setSeries1Value(i);//

categoryElement.setSeries2Value(10 - i);//

wdContext.node<name>().addElement(categoryElement);</b>

Check on to this Link for additional information :

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3261cd90-0201...

In the link goto page 11 to c the sample coding.

Hope this solves ur problem,

Regards,

Nagarajan.

former_member8655
Active Participant
0 Kudos