Skip to Content
0
May 30, 2008 at 06:56 AM

Business Graphics from Table and Series UI Element

37 Views

Hallo experts,

i try to provide a business graph, but have some problems with functionality of Series UI Element as i suppose.

At design Time i don't know how many series i have, it's depend on data wich i get from table. So as i found for this i can use Series UI Element instead of SimpleSeries.

So i in Layout i have following structure:

Categorie

Series(List)->SeriesPoint->Numeric Value

In Context:

MainNode with following children:

Date attribute (String)

SeriesNode with following children:

Name(String)

PoinNode with attribute:

(Integer) Summe

I set singelton of PointNode and SeriesNode to false;

Date Attribute is mapped to Catergorie

(Integer)Summe to Point Value

SeriesNode to to Series(List)

Here is part of code how i generate elements of some Node:

for(int m=0;m<allCodelineNames.size();m++){

String name=(String)allCodelineNames.get(m)

IPublicChangeList.ISeriesElement elem=

(IPublicChangeList.ISeriesElement)

wdThis.wdGetChangeListController().wdGetContext().nodeSeries().createSeriesElement();

IPublicChangeList.ISeriesPointElement elem2=

(IPublicChangeList.ISeriesPointElement)

wdThis.wdGetChangeListController().wdGetContext().nodeSeriesPoint().createSeriesPointElement();

LinkedHashMap result=(LinkedHashMap)codelineMap.get(name);

elem.setCodelineName(name);

int changeLists=Integer.parseInt((String)result.get(date));

elem2.setChangelistSum(changeLists);

wdThis.wdGetChangeListController().wdGetContext().nodeSeriesPoint().addElement(elem2);

wdThis.wdGetChangeListController().wdGetContext().nodeSeries().addElement(elem);

}

The problem is so that i still don't see different series i see only the first one.

Also it's not clear how the mainNode knew which nodeSeries elemnts it had

i also tried to implement this way;

statElem.node().getChildNode("Series",i).addElement(elem);

where statElem is element of mainNode, but it makes no difference

Have you have any ideas, could it be that i make something generell wrong with this UI Element?

Thank you in advance!!

Best Regards,

Daria

Edited by: Daria Sosunova on May 30, 2008 8:56 AM