
{"id":8273,"date":"2019-12-20T04:56:34","date_gmt":"2019-12-20T04:56:34","guid":{"rendered":"https:\/\/rax-stg-wp-aws.com\/blogs\/use-xml-publisher-to-show-charts\/"},"modified":"2026-11-03T19:29:31","modified_gmt":"2026-11-03T19:29:31","slug":"use-xml-publisher-to-show-charts","status":"publish","type":"blogs","link":"https:\/\/www.rackspace.com\/en-gb\/blogs\/use-xml-publisher-to-show-charts\/","title":{"rendered":"Use XML Publisher to show charts"},"content":{"rendered":"<p><strong>Introduction<\/strong><\/p>\n<p>This blog explains how to create Oracle&amp;reg; XML Publisher reports with charts.<\/p>\n<p>Often, reports contain data in a tabular format, but charts offer a graphical representation and better explain the data.<\/p>\n<p>For example, graphs could enhance the following reports:<\/p>\n<ul>\n<li>&nbsp;A customer\u2019s sales history based on organizational management (OM) data<\/li>\n<li>&nbsp;The number of instances of failed, completed, or completed-with-warning requests on a daily basis<\/li>\n<\/ul>\n<p><strong>Types of charts&nbsp;<\/strong><\/p>\n<ul>\n<li><strong>Bar chart (horizontal or vertical): <\/strong>Used to show data in the form of bars with an X-axis and Y-axis.<\/li>\n<li><strong>Line chart: <\/strong>Mainly used for chronological data.<\/li>\n<li><strong>Pie chart: <\/strong>Represents data in the form of a circular graph and used for proportional data.<\/li>\n<\/ul>\n<p><strong>&nbsp;Create bar charts<\/strong><\/p>\n<p><em>Example XML data file:<\/em><\/p>\n<p><em>&nbsp; &nbsp; &lt;main&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;STATUS&gt;Normal&lt;\/STATUS&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;REQ_COUNT&gt;210&lt;\/REQ_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;STATUS&gt;Warning&lt;\/STATUS&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;REQ_COUNT&gt;30&lt;\/REQ_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;STATUS&gt;Error&lt;\/STATUS&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;REQ_COUNT&gt;60&lt;\/REQ_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &lt;\/main&gt;<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26634-body-Picture1_25.png\" alt=\"xml publisher pic 1\" \/><\/p>\n<p>In an <em>rtf<\/em>&nbsp;template, insert an object of chart type from the XML Publisher add-in.<\/p>\n<p>Click the <strong>Advanced<\/strong>&nbsp;tab and paste the following text:<\/p>\n<p><em>&lt;Graph graphType = &#8220;BAR_VERT_CLUST&#8221;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &lt;Title text=&#8221;Concurrent Request Status 5-DEC-2019&#8243; visible=&#8221;true&#8221; horizontalAlignment=&#8221;CENTER&#8221;\/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &lt;O1Title text=&#8221;Request Status&#8221; visible=&#8221;true&#8221;\/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &lt;Y1Title text=&#8221;Number of Requests&#8221; visible=&#8221;true&#8221;\/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &lt;LocalGridData colCount=&#8221;{count(\/\/DATA_RECORD)}&#8221; rowCount=&#8221;1&#8243;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;RowLabels&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Label&gt;Request Count&lt;\/Label&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/RowLabels&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;ColLabels&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:for-each select=&#8221;\/\/DATA_RECORD&#8221;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;Label&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:value-of select=&#8221;STATUS&#8221;\/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/Label&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/xsl:for-each&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/ColLabels&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;DataValues&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;RowData&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:for-each select=&#8221;\/\/DATA_RECORD&#8221;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Cell&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:value-of select=&#8221;REQ_COUNT&#8221;\/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/Cell&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/xsl:for-each&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/RowData&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DataValues&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &lt;\/LocalGridData&gt;<br \/>\n&nbsp; &nbsp; &lt;\/Graph&gt;<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26634-body-Picture2_22.png\" alt=\"xml publisher pic 2\" \/><\/p>\n<p>\nThis creates a dummy chart image on the template. Use this image to size the chart as you need it in the output.<\/p>\n<p><strong>Explanation of bar chart XML<\/strong><\/p>\n<p>A line-by-line explanation of the code follows:<\/p>\n<p><em>&nbsp; &nbsp; &lt;Graph graphType = &#8220;BAR_VERT_CLUST&#8221;&gt;<\/em><\/p>\n<p>This section indicates the graph type category as <strong>BAR_VERT_CLUST<\/strong>, which is a bar chart with a vertical&nbsp;cluster format.<\/p>\n<p><em>&nbsp; &nbsp; &lt;Title text=&#8221;Concurrent Request Status 5-DEC-2019&#8243; visible=&#8221;true&#8221; horizontalAlignment=&#8221;CENTER&#8221;\/&gt;<\/em><\/p>\n<p>This line shows the title for the chart and identifies its alignment. You can also set a dynamic title by<br \/>\nusing an XML tag.<\/p>\n<p>&nbsp; &nbsp; <em>&lt;O1Title text=&#8221;Request Status&#8221; visible=&#8221;true&#8221;\/&gt;<br \/>\n&nbsp; &nbsp; &lt;Y1Title text=&#8221;Number of Requests&#8221; visible=&#8221;true&#8221;\/&gt;<\/em><\/p>\n<p>These lines name the X and Y axes of the bar chart.<\/p>\n<p><em>&nbsp; &nbsp; &lt;LocalGridData colCount=&#8221;{count(\/\/DATA_RECORD)}&#8221; rowCount=&#8221;1&#8243;&gt;<\/em><\/p>\n<p>This section identifies number of rows and columns in the chart.<\/p>\n<p>In our example, <em>colCount=&#8221;{count(\/\/DATA_RECORD)}&#8221;<\/em>, the XML data file has three <em>DATA_RECORD<\/em>&nbsp;items, so this chart has three columns.<\/p>\n<p><em>rowCount=&#8221;1&#8243;<\/em>, in our bar chart, identifies the number of rows.<\/p>\n<p>&nbsp; &nbsp; &lt;RowLabels&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;Label&gt;Request Count&lt;\/Label&gt;<br \/>\n&nbsp; &nbsp; &lt;\/RowLabels&gt;<\/p>\n<p>This section defines the row labels as static or dynamic. We used <strong>Request Count<\/strong>.<\/p>\n<p><em>&nbsp; &nbsp; &lt;ColLabels&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:for-each select=&#8221;\/\/DATA_RECORD&#8221;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Label&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:value-of select=&#8221;STATUS&#8221;\/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/Label&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/xsl:for-each&gt;<br \/>\n&nbsp; &nbsp; &lt;\/ColLabels&gt;<\/em><\/p>\n<p>This section defines the column labels. You can use dynamic column labels based on the value of <em>STATUS&nbsp;<\/em>tag in the XML data file.<\/p>\n<p><em>&nbsp; &nbsp; &lt;DataValues&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;RowData&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:for-each select=&#8221;\/\/DATA_RECORD&#8221;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Cell&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:value-of select=&#8221;REQ_COUNT&#8221;\/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/Cell&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/xsl:for-each&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/RowData&gt;<br \/>\n&nbsp; &nbsp; &lt;\/DataValues&gt;<\/em><\/p>\n<p>This section refers to the data values in the chart. The created bars should have a size proportional to the&nbsp;value of the <em>REQ_COUNT<\/em>&nbsp;tag in the XML data file.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26634-body-Picture3_14.png\" alt=\"xml publisher pic 3\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26634-body-Picture4_12.png\" alt=\"xml publisher pic 4\" \/><\/p>\n<p><strong>&nbsp;Create pie charts&nbsp;<\/strong><\/p>\n<p>Example XML data file:<\/p>\n<p><em>&nbsp; &lt;main&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;STATUS&gt;Normal&lt;\/STATUS&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;REQ_COUNT&gt;210&lt;\/REQ_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;STATUS&gt;Warning&lt;\/STATUS&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;REQ_COUNT&gt;30&lt;\/REQ_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;STATUS&gt;Error&lt;\/STATUS&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;REQ_COUNT&gt;60&lt;\/REQ_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &lt;\/main&gt;<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26634-body-Picture4_13.png\" alt=\"xml publisher pic 4\" \/><\/p>\n<p>In the <em>rtf<\/em> template, insert an object of chart type from Publisher Add-In.&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26634-body-Picture5_12.png\" alt=\"xml publisher pic 5\" \/><\/p>\n<p>Click the <strong>Advanced<\/strong> tab and paste the following text:&nbsp;<\/p>\n<p>\n&nbsp; &nbsp;<em> &lt;Graph graphType=&#8221;PIE&#8221;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;Title text=&#8221;Concurrent Request Status 5-DEC-2019&#8243;&nbsp;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;visible=&#8221;true&#8221; horizontalAlignment=&#8221;LEFT&#8221; \/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;LocalGridData rowCount=&#8221;{count(\/\/DATA_RECORD)}&#8221; colCount=&#8221;1&#8243;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;RowLabels&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:for-each select=&#8221;\/\/DATA_RECORD&#8221;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Label&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:value-of select=&#8221;STATUS&#8221; \/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/Label&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/xsl:for-each&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/RowLabels&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;DataValues&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:for-each select=&#8221;\/\/DATA_RECORD&#8221;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;RowData&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Cell&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:value-of select=&#8221;REQ_COUNT&#8221;\/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/Cell&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/RowData&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/xsl:for-each&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/DataValues&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/LocalGridData&gt;<br \/>\n&nbsp; &nbsp; &lt;\/Graph&gt;<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26634-body-Picture6_9.png\" alt=\"xml publisher pic 6\" \/><\/p>\n<p><strong>&nbsp;&nbsp;Explanation of pie chart XML<\/strong><\/p>\n<p>A line-by-line explanation of the code follows:<\/p>\n<p><em>&nbsp; &nbsp; &lt;Graph graphType=&#8221;PIE&#8221;&gt;<\/em><\/p>\n<p>This section identifies the graph type and category as the `PIE` chart format.<\/p>\n<p><em>&nbsp; &nbsp; &lt;LocalGridData rowCount=&#8221;{count(\/\/DATA_RECORD)}&#8221; colCount=&#8221;1&#8243;&gt;<\/em><\/p>\n<p>This section identifies number of rows and columns in the chart.<\/p>\n<p>In our example, <em>rowCount=&#8221;{count(\/\/DATA_RECORD)}&#8221;<\/em>, the XML data file has three <em>DATA_RECORD<\/em>&nbsp;items, so&nbsp;this chart has three sections in the circle.<\/p>\n<p><em>&nbsp; &nbsp; &lt;RowLabels&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:for-each select=&#8221;\/\/DATA_RECORD&#8221;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Label&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:value-of select=&#8221;STATUS&#8221; \/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/Label&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/xsl:for-each&gt;<br \/>\n&nbsp; &nbsp; &lt;\/RowLabels&gt;<\/em><\/p>\n<p>This section defines the row labels, which are static or dynamic. You can use row labels based on the value&nbsp;of the <em>STATUS<\/em>&nbsp;tag in the XML data file.<\/p>\n<p><em>&lt;DataValues&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;RowData&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:for-each select=&#8221;\/\/DATA_RECORD&#8221;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;Cell&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:value-of select=&#8221;REQ_COUNT&#8221;\/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/Cell&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/xsl:for-each&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/RowData&gt;<br \/>\n&nbsp; &nbsp; &lt;\/DataValues&gt;<\/em><\/p>\n<p>\nThis section refers to the data value of the chart, creating a pie of a fractional size that is proportional&nbsp;to the value of the <em>REQ_COUNT<\/em>&nbsp;tag. The values represent fractions of the total count.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26634-body-Picture7_9.png\" alt=\"xml publisher pic 7\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26634-body-Picture8_9.png\" alt=\"xml publisher pic 8\" \/><\/p>\n<p><strong>&nbsp;Create line charts&nbsp;<\/strong><\/p>\n<p>Generally, use this chart type when data is timeline-based.<br \/>\nExample XML data file:<\/p>\n<p><em>&lt;main&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;YEAR&gt;2011&lt;\/YEAR&gt;&lt;ORDER_COUNT&gt;6797&lt;\/ORDER_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;YEAR&gt;2012&lt;\/YEAR&gt;&lt;ORDER_COUNT&gt;6686&lt;\/ORDER_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;YEAR&gt;2013&lt;\/YEAR&gt;&lt;ORDER_COUNT&gt;6851&lt;\/ORDER_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;YEAR&gt;2014&lt;\/YEAR&gt;&lt;ORDER_COUNT&gt;7065&lt;\/ORDER_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;YEAR&gt;2015&lt;\/YEAR&gt;&lt;ORDER_COUNT&gt;6421&lt;\/ORDER_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;YEAR&gt;2016&lt;\/YEAR&gt;&lt;ORDER_COUNT&gt;6816&lt;\/ORDER_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;YEAR&gt;2017&lt;\/YEAR&gt;&lt;ORDER_COUNT&gt;9426&lt;\/ORDER_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;YEAR&gt;2018&lt;\/YEAR&gt;&lt;ORDER_COUNT&gt;9008&lt;\/ORDER_COUNT&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/DATA_RECORD&gt;<br \/>\n&nbsp; &nbsp; &lt;\/main&gt;<\/em><br \/>\nIn an <em>rtf<\/em>&nbsp;template, insert an object of chart type from the XML Publisher add-in.<\/p>\n<p>Click the <strong>Advanced<\/strong>&nbsp;tab and paste the following text:<\/p>\n<p><em>&lt;Graph graphType=&#8221;LINE_VERT_ABS&#8221;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;Title text=&#8221;Cutomer Orders Yearwise&#8221; visible=&#8221;true&#8221; horizontalAlignment=&#8221;CENTER&#8221; \/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;O1Title text=&#8221;Year&#8221; visible=&#8221;true&#8221; \/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;Y1Title text=&#8221;Number of Orders&#8221; visible=&#8221;true&#8221; \/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;LocalGridData colCount=&#8221;{count(\/\/DATA_RECORD)}&#8221; rowCount=&#8221;1&#8243;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;RowLabels&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;Label&gt;Order Count&lt;\/Label&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/RowLabels&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;ColLabels&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:for-each select=&#8221;\/\/DATA_RECORD&#8221;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;Label&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xsl:value-of select=&#8221;YEAR&#8221; \/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/Label&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/xsl:for-each&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/ColLabels&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;DataValues&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;RowData&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:for-each select=&#8221;\/\/DATA_RECORD&#8221;&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;Cell&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;xsl:value-of select=&#8221;ORDER_COUNT&#8221; \/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/Cell&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/xsl:for-each&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/RowData&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/DataValues&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;&lt;\/LocalGridData&gt;<br \/>\n&nbsp; &nbsp; &lt;\/Graph&gt;<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26634-body-Picture9_6.png\" alt=\"xml publisher pic 9\" \/><\/p>\n<p>&nbsp;This creates a dummy chart image on the template. Use this image to size the chart as you need it in the output.<\/p>\n<p><strong>&nbsp;Explanation of line chart XML<\/strong><\/p>\n<p>A line-by-line explanation of the code follows:<\/p>\n<p><em>&nbsp; &nbsp;&lt;Graph graphType=&#8221;LINE_VERT_ABS&#8221;&gt;<\/em><\/p>\n<p>This section indicates the graph type and category as <em>LINE_VERT_ABS<\/em>, which is a line chart.&nbsp;The rest of the tags are the same as for a BAR type chart.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26634-body-Picture10_8.png\" alt=\"xml publisher pic 10\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26634-body-Picture11_7.png\" alt=\"xml publisher pic 11\" \/><\/p>\n<p><strong>&nbsp;Chart uses&nbsp;<\/strong><\/p>\n<p>In Oracle, charts are useful for analytics-related reports. Any XML publisher report can take&nbsp;advantage of this functionality.<\/p>\n<p><strong>&nbsp;Conclusion<\/strong><\/p>\n<p>Charts are easy to read and better explain data for the end users. For large data sets, you can&nbsp;summarize the data to a materialized view, and use this view to create reports with XML Publisher,&nbsp;which also saves you from needing to use expensive third-party tools.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use XML Publisher to show charts<\/p>\n","protected":false},"author":2,"featured_media":8275,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"content-type":"","nid":"26634","content_type":"blog","created_by":"10130","authored_on":"2024-02-21T04:56:34+00:00","field_article_industries":"","tag_category":"Technical","field_blog_author_text":"by Rackspace Technology Staff","seo_description":"Enhance data representation in Oracle XML Publisher reports with charts. Create visually appealing and easy-to-understand reports.\r\n","field_featured_image":"","insights_image":"\/wp-content\/uploads\/2026\/blog_technical_images\/26634-insights_image-how-to-technical-blog-1-insights.jpg","field_partners":"Oracle","rxt_platforms":"Business Intelligence","product":"","publisheddate":"2019-12-20T04:56:34","rxt_solutions":"Analytics & Business Insights","opengraph_tag":"","x_tag":"","teaser_flag":"Technical Blog","seo_titile":"Use XML Publisher to Create Dynamic Reports | Rackspace Technology","field_topics":"Data","field_slug":"use-xml-publisher-to-show-charts","footnotes":""},"categories":[178],"tags":[189,206,204],"class_list":["post-8273","blogs","type-blogs","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-data","tag-oracle","tag-technical"],"_links":{"self":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs\/8273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs"}],"about":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/types\/blogs"}],"author":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/comments?post=8273"}],"version-history":[{"count":3,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs\/8273\/revisions"}],"predecessor-version":[{"id":10013,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs\/8273\/revisions\/10013"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/media\/8275"}],"wp:attachment":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/media?parent=8273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/categories?post=8273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/tags?post=8273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}