RSUpgradeProgressiveChart.xsl 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: rspecupgrade
  5. (C) Copyright IBM Corp. 2005, 2010
  6. US Government Users Restricted Rights - Use, duplication or disclosure
  7. restricted by GSA ADP Schedule Contract with IBM Corp.
  8. -->
  9. <!-- COPYRIGHT_DATA { 'YEAR':[2005, 2009], 'RELEASE':['colorado_wave1'], 'VISIBLE':'YES', 'COMPONENT':'rspecupgrade' }-->
  10. <!--All lines above the COPYRIGHT_DATA line will be replaced when copyright notices are generated. -->
  11. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:baltic="http://developer.cognos.com/schemas/report/1/" xmlns="http://developer.cognos.com/schemas/report/2.0/" xmlns:date="http://exslt.org/dates-and-times" xmlns:exsl="http://exslt.org/common" xmlns:xalan="http://xml.apache.org/xalan" xmlns:java="http://xml.apache.org/xalan/java" extension-element-prefixes="xalan date exsl" exclude-result-prefixes="xalan java baltic date exsl">
  12. <xsl:template name="progressiveChartTemplate">
  13. <progressiveChart>
  14. <xsl:call-template name="addStyle">
  15. <xsl:with-param name="for" select="'chart'"/>
  16. <xsl:with-param name="default" select="'false'"/>
  17. </xsl:call-template>
  18. <xsl:attribute name="orientation">vertical</xsl:attribute>
  19. <xsl:call-template name="standardChartAttributesTemplate"/>
  20. <xsl:call-template name="generateMasterDetailLinks2">
  21. <xsl:with-param name="p_frame" select="."/>
  22. </xsl:call-template>
  23. <!-- <xsl:call-template name="legendTemplate"/> -->
  24. <xsl:call-template name="axisProgressiveTemplate"/>
  25. <xsl:variable name="v_refItem" select="baltic:chartLevel/baltic:chartText/baltic:queryItemRef/@refItem"/>
  26. <xsl:variable name="v_progressiveBars">
  27. <xsl:call-template name="chartLevelTemplate">
  28. <xsl:with-param name="p_mode" select="'columnEdge'"/>
  29. </xsl:call-template>
  30. </xsl:variable>
  31. <xsl:if test="$v_progressiveBars/*">
  32. <progressiveBars>
  33. <xsl:copy-of select="$v_progressiveBars"/>
  34. </progressiveBars>
  35. </xsl:if>
  36. <xsl:call-template name="defaultMeasureTemplate"/>
  37. <xsl:if test="baltic:progressiveChart/baltic:totalColumn">
  38. <total>
  39. <xsl:call-template name="addStyle">
  40. <xsl:with-param name="for" select="'progressiveChartTotalColumn'"/>
  41. <xsl:with-param name="default" select="'false'"/>
  42. </xsl:call-template>
  43. <totalColumnLabel>
  44. <chartContents>
  45. <chartTextItem>
  46. <dataSource>
  47. <staticValue>Total</staticValue>
  48. </dataSource>
  49. </chartTextItem>
  50. </chartContents>
  51. </totalColumnLabel>
  52. <xsl:if test="baltic:progressiveChart/baltic:columnColor[@columnType='total']/*">
  53. <totalColumnColor>
  54. <xsl:apply-templates select="baltic:progressiveChart/baltic:columnColor[@columnType='total']/*"/>
  55. </totalColumnColor>
  56. </xsl:if>
  57. </total>
  58. </xsl:if>
  59. <xsl:if test="baltic:progressiveChart/baltic:columnColor[@columnType='positiveValues']/*">
  60. <positiveColumnColor>
  61. <xsl:apply-templates select="baltic:progressiveChart/baltic:columnColor[@columnType='positiveValues']/*"/>
  62. </positiveColumnColor>
  63. </xsl:if>
  64. <xsl:if test="baltic:progressiveChart/baltic:columnColor[@columnType='negativeValues']/*">
  65. <negativeColumnColor>
  66. <xsl:apply-templates select="baltic:progressiveChart/baltic:columnColor[@columnType='negativeValues']/*"/>
  67. </negativeColumnColor>
  68. </xsl:if>
  69. <xsl:if test="baltic:progressiveChart/baltic:columnColor[@columnType='first']/*">
  70. <firstColumnColor>
  71. <xsl:apply-templates select="baltic:progressiveChart/baltic:columnColor[@columnType='first']/*"/>
  72. </firstColumnColor>
  73. </xsl:if>
  74. <xsl:call-template name="commonChartTemplate"/>
  75. <xsl:call-template name="commonChartMarkerTemplate"/>
  76. <xsl:call-template name="commonChartBaselineTemplate">
  77. <xsl:with-param name="chartType" select="'progressiveChart'"/>
  78. </xsl:call-template>
  79. </progressiveChart>
  80. </xsl:template>
  81. <xsl:template name="axisProgressiveTemplate">
  82. <xsl:for-each select="baltic:axis">
  83. <xsl:variable name="v_axisPosition" select="@axisPosition"/>
  84. <xsl:choose>
  85. <xsl:when test="$v_axisPosition = 'X'">
  86. <xsl:call-template name="ordinalAxis">
  87. <xsl:with-param name="p_gridLines" select="0"/>
  88. </xsl:call-template>
  89. </xsl:when>
  90. <xsl:when test="$v_axisPosition = 'Y1'">
  91. <numericalAxisProgressive>
  92. <xsl:call-template name="copyAxisAttsTemplate"/>
  93. <xsl:call-template name="axisTitleTemplate"/>
  94. <xsl:call-template name="gridlinesTemplate">
  95. <xsl:with-param name="p_chart" select=".."/>
  96. </xsl:call-template>
  97. <xsl:call-template name="mergeStylesFromAxisAndAxisLabelsTemplate"/>
  98. </numericalAxisProgressive>
  99. </xsl:when>
  100. </xsl:choose>
  101. </xsl:for-each>
  102. </xsl:template>
  103. </xsl:stylesheet>