我正在尝试创建一个包含多个系列的Oracle BI Publisher图表,但我不确定如何构建我的xml以获得多个系列。我的xml是:
<?xml version="1.0" ?>
<report>
<rowd>
<cddiv>Self</cddiv>
<rowdx>
<cdtxt>Time</cdtxt>
<cdval>120</cdval>
</rowdx>
<rowdx>
<cdtxt>Interest</cdtxt>
<cdval>200</cdval>
</rowdx>
</rowd>
<rowd>
<cddiv>All excluding self</cddiv>
<rowdx>
<cdtxt>Time</cdtxt>
<cdval>110</cdval>
</rowdx>
<rowdx>
<cdtxt>Interest</cdtxt>
<cdval>190</cdval>
</rowdx>
</rowd>
</report>
我将cdtxt
设置为标签,将cdval
设置为值,将cddiv
设置为Word中图表向导上的系列。然而,这会带回一张空白图表。有没有人有一个例子说明xml对于多个系列应该是什么,或者任何人都可以纠正我的?
答案 0 :(得分:0)
原来答案是:
<?xml version="1.0" ?>
<report>
<tque>
<tcla>2006</tcla>
<Self>4.3</Self>
<Excl>4</Excl>
</tque>
<tque>
<tcla>2007</tcla>
<Self>4.2</Self>
<Excl>4</Excl>
</tque>
<tque>
<tcla>2008</tcla>
<Self>4.1</Self>
<Excl>3</Excl>
</tque>
</report>
chart:
<Graph graphType="BAR_HORIZ_CLUST" stylePath="/oracle/dss/graph/styles/frankie.xml">
<LegendArea visible="true" />
<Y1Axis axisMinAutoScaled="false" axisMinValue="0" axisMaxAutoScaled="false" axisMaxValue="5" majorTickStepAutomatic="false" majorTickStep="1" />
<MarkerText visible="true" markerTextPlace="MTP_INSIDE_MAX">
<GraphFont style="FS_BOLD" bold="true" fontColor="#ffffff" size="20"/>
<Y1ViewFormat>
<ViewFormat numberType="NUMTYPE_GENERAL" numberTypeUsed="true" decimalDigit="1" decimalDigitUsed="true"/>
</Y1ViewFormat>
</MarkerText>
<LocalGridData colCount="{count(xdoxslt:group(.//tque, 'tcla'))}" rowCount="2">
<RowLabels>
<Label>Self</Label>
<Label>All excl. Self</Label>
</RowLabels>
<ColLabels>
<xsl:for-each-group select=".//tque" group-by="tcla" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<Label>
<xsl:value-of select="current-group()/tcla" />
</Label>
</xsl:for-each-group>
</ColLabels>
<DataValues>
<RowData>
<xsl:for-each-group select=".//tque" group-by="tcla" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<Cell>
<xsl:value-of select="sum(current-group()/Self)" />
</Cell>
</xsl:for-each-group>
</RowData>
<RowData>
<xsl:for-each-group select=".//tque" group-by="tcla" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<Cell>
<xsl:value-of select="sum(current-group()/Excl)" />
</Cell>
</xsl:for-each-group>
</RowData>
</DataValues>
</LocalGridData>
<PlotArea fillColor="#e3e3e3" borderColor="#000000" />
</Graph>