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