Skip to Content
Former Member
Apr 11, 2008 at 12:23 PM

many dynamic series in BusinessGraphics


Hi all:

I got a List form RFC. I want to show in a pie chart.

I can't sure the List size.

My idea is dynamic add attribute, and create element.

But it does't work.

my code is like this

List list = wdContext.currentZmtk_Hr_Demo_InputElement().modelObject().getOutput().getIt_Depart();

int a = list.size();

IWDNodeInfo rootNodeInfo = wdContext.getNodeInfo();
IWDNodeInfo categoryNodeInfo = rootNodeInfo.getChild("category");

for (int i = 0; i < list.size(); i++) {

	categoryNodeInfo.addAttribute("seriesValue"+(i+1), "");
	Zmtk_Hr_01 z = (Zmtk_Hr_01) list.get(i);
	String category = z.getDepart();
	short number = z.getNumber();
	ICategoryElement ele = wdContext.createCategoryElement();
	ele.setAttributeValue("seriesValue"+(i+1),(double) number+"");
	//ele.setSeriesValue((double) number);

I know this is wrong.

Could anyone show me what to do?