Categories
- All Categories
- Oracle Analytics Learning Hub
- 30 Oracle Analytics Sharing Center
- 18 Oracle Analytics Lounge
- 238 Oracle Analytics News
- 45 Oracle Analytics Videos
- 16K Oracle Analytics Forums
- 6.2K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 88 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Pie Chart - how can I remove the extra row from the legend? or create slice labels?
Summary
Pie Chart - how can I remove the extra row from the legend? or create slice labels?
Content
I built a simple pie chart that is coming back with an extra row in the legend. It has a color code not on the pie chart and no value for the label. Here is the XSL from the RTF template:
<Graph pieDepth="30" pieTilt="20" seriesEffect="SE_AUTO_GRADIENT" graphType= "PIE"><LegendArea visible="true"/>
<LocalGridData colCount="1" rowCount="{count(xdoxslt:group(.//EU_TRW_COMP_SUM, 'EU_TRW_COMP_DESCR'))}">
<RowLabels><xsl:for-each-group select=".//EU_TRW_COMP_SUM" group-by="EU_TRW_COMP_DESCR"><xsl:sort select="current-group()/EU_TRW_COMP_DESCR"/>
<Label><xsl:value-of select="current-group()/EU_TRW_COMP_DESCR"/></Label></xsl:for-each-group></RowLabels>
<DataValues><xsl:for-each-group select=".//EU_TRW_COMP_SUM" group-by="EU_TRW_COMP_DESCR"><xsl:sort select="current-group()/EU_TRW_COMP_DESCR"/>
<RowData><Cell><xsl:value-of select="sum(current-group()/EU_TRW_COMP_SUM[.!=''])"/></Cell></RowData></xsl:for-each-group></DataValues>
</LocalGridData>
</Graph>
and the XML used to populate it
<EU_TRW_COMP_SUM>
<EU_TRW_COMP_DESCR>Cash Pay</EU_TRW_COMP_DESCR><EU_TRW_COMP_SUM>306077.880000</EU_TRW_COMP_SUM>
</EU_TRW_COMP_SUM>
<EU_TRW_COMP_SUM>
<EU_TRW_COMP_DESCR>Health and Wellness</EU_TRW_COMP_DESCR><EU_TRW_COMP_SUM>451483.080000</EU_TRW_COMP_SUM>
</EU_TRW_COMP_SUM>
<EU_TRW_COMP_SUM>
<EU_TRW_COMP_DESCR>Company Stock</EU_TRW_COMP_DESCR><EU_TRW_COMP_SUM>1580190.780000</EU_TRW_COMP_SUM>
</EU_TRW_COMP_SUM>
<EU_TRW_COMP_SUM>
<EU_TRW_COMP_DESCR>Retirement Savings</EU_TRW_COMP_DESCR><EU_TRW_COMP_SUM>527111.550000</EU_TRW_COMP_SUM>
</EU_TRW_COMP_SUM>
<EU_TRW_COMP_SUM>
<EU_TRW_COMP_DESCR>Other Benefits</EU_TRW_COMP_DESCR><EU_TRW_COMP_SUM>225741.540000</EU_TRW_COMP_SUM>
</EU_TRW_COMP_SUM>
In a perfect world I would prefer to have the pie chart slices have labels and not use a legend at all. If this isn't possible I need to at least get the erroneous legend entry removed.
For those that work with PeopleSoft this being used on the "Printer Friendly" link on the Total Rewards fluid page in HR.
Thanks...
Answers
-
I see that you have an XML element with the same name for parent and child node <EU_TRW_COMP_SUM>. I modified the XML as below, giving the parent a new name and the extra legend was gone. You will have to either change the name in the XML or change the XSL code to correctly refer to the child nodes alone while grouping, selecting etc..
<DATA>
<ABC>
<EU_TRW_COMP_DESCR>Cash Pay</EU_TRW_COMP_DESCR>
<EU_TRW_COMP_SUM>306077.880000</EU_TRW_COMP_SUM>
</ABC>
<ABC>
<EU_TRW_COMP_DESCR>Health and Wellness</EU_TRW_COMP_DESCR>
<EU_TRW_COMP_SUM>451483.080000</EU_TRW_COMP_SUM>
</ABC>
<ABC>
<EU_TRW_COMP_DESCR>Company Stock</EU_TRW_COMP_DESCR>
<EU_TRW_COMP_SUM>1580190.780000</EU_TRW_COMP_SUM>
</ABC>
<ABC>
<EU_TRW_COMP_DESCR>Retirement Savings</EU_TRW_COMP_DESCR>
<EU_TRW_COMP_SUM>527111.550000</EU_TRW_COMP_SUM>
</ABC>
<ABC>
<EU_TRW_COMP_DESCR>Other Benefits</EU_TRW_COMP_DESCR>
<EU_TRW_COMP_SUM>225741.540000</EU_TRW_COMP_SUM>
</ABC>
</DATA>
0 -
Thanks Sherry, that was the problem. I'm using PSoft file layout and my record name used to create the file layout segment was the same as one of the field names. I changed my record name which changes the parent name in the XML.
Thanks so much.
-John
0