on 2007 May 10 6:30 PM
Hello everyone,
I'm customizing a pie chart (UI Element BusinessGraphics) with different colors like this:
On the WdDoModify:
if (firstTime){
final IWDBusinessGraphics gfx = (IWDBusinessGraphics) view.getElement("BusinessGraphicsChart");
final StringBuffer cuString = new StringBuffer(1024);
cuString.append("<?xml version="1.0" encoding="ascii"?>");
cuString.append("<SAPChartCustomizing>");
cuString.append("<Values>");
IPrivateGraph.IXptoNode nodeXpto = wdContext.nodeXpto();
int size = nodeXpto.size();
for (int aIndex = 0; aIndex < size; ++aIndex) {
IPrivateGraph.IXptoElement catElement = nodeXpto.getXptoElementAt(aIndex);
cuString.append("<Point id="");
cuString.append( catElement.getText() );
cuString.append("">");
cuString.append("<Color>");
if ("Category A".equalsIgnoreCase(catElement.getText())) {
cuString.append("RGB(255,0,0)");
} else if ("Category B".equalsIgnoreCase(catElement.getText())){
cuString.append("RGB(255,255,0)");
}
cuString.append("</Color>");
cuString.append("</Point>");
}
cuString.append("</Values>");
cuString.append("</SAPChartCustomizing>");
gfx.setDirectCustomizing( cuString.toString() );
}
Everything works fine, with the colours i want applied to the different cattegories. But Before i customized the chart, i could see the values (in my case, percentages) on small labels pointing to each slice of the pie. Now they disappeared. Do i need to add other label to XML ? Can anyone help?
Thank you,
Nuno
<Values>
<Series>
<ShowLabel>true</ShowLabel>
</Series>
.............
</Values>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nuno,
the point customizing overwrites the complete series customizing. That's why you need to add the tag <ShowLabel>true</ShowLabel> to your point customizing, in your case:
[...]
cuString.append("<ShowLabel>true</ShowLabel>");
cuString.append("<Color>");
[...]
you may also need to copy the Format to a <Format> tag below the <ShowLabel> tag, e.g.
<Format>0.0 "%"</Format>.
This should work.
Regards
Matthias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
61 | |
11 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.