0

我正在尝试创建具有多个系列的 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>

我在 Word 中的图表向导中设置cdtxt为标签、cdval值和系列的位置。cddiv然而,这会带回一个空白图表。有没有人有一个关于多个系列的 xml 应该是什么的例子,或者任何人都可以纠正我的?

4

1 回答 1

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>
于 2015-09-07T14:21:09.593 回答