4 Replies Latest reply: Apr 30, 2012 7:55 AM by Avinash_Varma RSS

    Help Required to create grpah in BI Publisher

    933688
      Am trying to create graph in BI Publisher and source is Web Services.

      Can anyone try to change XSL code to get bars instead of lines and how to get different colors for the bars.

      Here is my XSL code:

      <Graph depthAngle="90" depthRadius="5" seriesEffect="SE_AUTO_GRADIENT" graphType="LINE_VERT_STACK"
      markerDisplayed="true">
      <Y1Axis axisMinAutoScaled="false" axisMinValue="0" axisMaxAutoScaled="false" visible="false"
      axisMaxValue="5" majorTickStepAutomatic="false" majorTickStep="1"/>
      <X1Axis axisMinAutoScaled="false" axisMinValue="00" axisMaxAutoScaled="false" visible="true"
      axisMaxValue="24" majorTickStepAutomatic="false" majorTickStep="1"
      axisMaxLabelVisible="true"/>
      <O1Axis axisMinAutoScaled="false" axisMinValue="00" axisMaxAutoScaled="false" visible="true"
      axisMaxValue="24" majorTickStepAutomatic="false" majorTickStep="1"
      axisMaxLabelVisible="true"/>
      <O1MajorTick tickStyle="GS_GRID" visible="true"/>
      <Y1MajorTick tickStyle="GS_GRID" visible="true"/>
      <X1MajorTick tickStyle="GS_GRID" visible="true"/>
      <O1TickLabel textFittingAutomatic="true" fontSizeAbsolute="false"/>
      <X1TickLabel textFittingAutomatic="true" fontSizeAbsolute="false"/>
      <SeriesItems defaultMarkerType="MT_STEPPED_LINE" defaultLineWidth="20">
      <Series id="1" color="#C0FFC0"/>
      <Series id="2" color="#FFC0FF"/>
      <Series id="3" color="#C0C0FF"/>
      <Series id="0" color="#FFFF00"/>
      </SeriesItems>
      <LegendArea visible="false" alongGraphEdge="true"/>
      <LocalGridData colCount="{count(xdoxslt:group(.//G_2, 'HOUR'))}"
      rowCount="{count(xdoxslt:group(.//G_3, 'STATUS_DEF'))}">
      <RowLabels>
      <xsl:for-each-group select=".//G_3" group-by="STATUS_DEF"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Label>
      <xsl:value-of select="current-group()/STATUS_DEF"/>
      </Label>
      </xsl:for-each-group>
      </RowLabels>
      <ColLabels>
      <xsl:for-each-group select=".//G_2" group-by="HOUR"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Label>
      <xsl:value-of select="current-group()/HOUR"/>
      </Label>
      </xsl:for-each-group>
      </ColLabels>
      <DataValues>
      <RowData>
      <xsl:for-each-group select=".//G_2" group-by="HOUR"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Cell>
      <xsl:value-of select="sum(current-group()/STATUS[.!='']) + 0.5"/>
      </Cell>
      </xsl:for-each-group>
      </RowData>
      </DataValues>
      </LocalGridData>
      </Graph>


      Thanks in Advance.
      Usha.
        • 1. Re: Help Required to create grpah in BI Publisher
          933708
          Try Graph graphType = "BAR_VERT_CLUST" instead of "LINE_VERT_STACK" for getting bars instead of lines.

          Regards,
          Mallikarjuna Katari.
          • 2. Re: Help Required to create grpah in BI Publisher
            Avinash_Varma
            check below graph xml for different color bars

            <Graph depthAngle="50" depthRadius="8" pieDepth="30" pieTilt="20"><LegendArea visible="true" /><Title text="Query Execution By Time" visible="true" horizontalAlignment="CENTER"><GraphFont size="11" bold="true" italic="false" underline="false" fontColor="#000080" /></Title><SeriesItems><xsl:for-each select="./G_1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><Series id="0" color="#404040" /><Series id="1" color="#D3D3D3" /><Series id="2" color="#993399" /><Series id="3" color="#000000" /></xsl:for-each></SeriesItems><MarkerText visible="true" markerTextPlace="MTP_OUTSIDE_MAX"><Y1ViewFormat><ViewFormat decimalDigit="0" decimalDigitUsed="true" /><GraphFont bold="true" italic="false" underline="false" fontColor="#000000" /></Y1ViewFormat></MarkerText><O1Title text="Range" visible="true"><GraphFont size="10" bold="true" italic="false" underline="false" fontColor="#000000" /></O1Title><Y1Title text="Time in Minutes" visible="true"><GraphFont size="10" bold="true" italic="false" underline="false" fontColor="#000000" /></Y1Title><LocalGridData colCount="{count(xdoxslt:group(.//G_1, 'RAN'))}" rowCount="{count(xdoxslt:group(.//G_1, 'RAN'))}"><RowLabels><xsl:for-each-group select=".//G_1" group-by="RAN" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><Label><xsl:value-of select="current-group()/RAN" /></Label></xsl:for-each-group></RowLabels><ColLabels><xsl:for-each-group select=".//G_1" group-by="RAN" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><Label><xsl:value-of select="current-group()/RAN" /></Label></xsl:for-each-group></ColLabels><DataValues><xsl:for-each-group select="//G_1" group-by="./RAN" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:variable name="G1" select="current-group()" /><RowData><xsl:for-each-group select="//G_1" group-by="./RAN"><Cell><xsl:value-of select="sum($G1[(./RAN=current()/RAN)]/COUNT_OC)" /></Cell></xsl:for-each-group></RowData></xsl:for-each-group></DataValues></LocalGridData></Graph>
            • 3. Re: Help Required to create grpah in BI Publisher
              933688
              Am trying to use this code in my xml but colors are not updating.

              <SeriesItems defaultMarkerType="MT_STEPPED_LINE" defaultLineWidth="20"><xsl:for-each select=".//G_2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><Series id="0" color="#404040" /><Series id="1" color="#D3D3D3" /><Series id="2" color="#993399" /><Series id="3" color="#000000" /></xsl:for-each></SeriesItems>

              Usha.
              • 4. Re: Help Required to create grpah in BI Publisher
                Avinash_Varma
                Hi send me your xml and rtf template i will try at my side

                my email id : datlaavinash@gmail.com