Bar Chart

Attribute Name XML Declaration Description / Notes

name

<cell type="text" data-format="text" alignment="left" style="col_header_1" print-width="130" chart-attr-name="seriesName">TotalOperatingCosts</cell>

“seriesName” is a constant attribute name. The value is derived based on the cell type definition.

items

<cell type="expr" data-format="integer" alignment="right" style="header_1" suppress-formatting="true">DBGET("DailyOpsQuery","prepCostTotal")</cell>

This attribute must directly follow the “seriesName” declaration. This is the chart data points/items values. The “suppress-formatting” property must be set to true. The value is derived based on the cell type definition.

groupData

<cell type="column" data-format="text" alignment="left" chart-attr-name="groupData">Group A</cell>

“groupData” is a constant attribute name. The value is derived based on the cell type definition.

yAxisTitle

<cell type="text" data-format="text" alignment="left" chart-attr-name="yAxisTitle">Y Axis Title</cell>

“yAxisTitle” is a constant attribute name. The value is derived based on the cell type definition.

xAxisTitle

<cell type="text" data-format="text" alignment="left" chart-attr-name="xAxisTitle">X Axis Title</cell>

“xAxisTitle” is a constant attribute name. The value is derived based on the cell type definition.

hoverBehavior

<cell type="chart_text" data-format="text" alignment="left" chart-attr-name="hoverBehavior">dim</cell>

“hoverBehavior” is a constant attribute name. The cell type must be set to “chart_text”. The valid value is dim.

stackValue

<cell type="chart_text" data-format="text" alignment="left" chart-attr-name="stackValue">on</cell>

“stackValue” is a constant attribute name. The cell type must be set to “chart_text”. Valid values areon or off.

hoverSeriesLabel

<cell type="text" data-format="text" alignment="left" chart-attr-name="hoverSeriesLabel">Test Series</cell>

“hoverSeriesLabel” is a constant attribute name. The value is derived based on the cell type definition.

hoverValueLabel

<cell type="text" data-format="text" alignment="left" chart-attr-name="hoverValueLabel">Test Value</cell>

“hoverValueLabel” is a constant attribute name. The value is derived based on the cell type definition.

hoverGroupLabel

<cell type="text" data-format="text" alignment="left" chart-attr-name="hoverGroupLabel">Test Group</cell>

“hoverGroupLabel” is a constant attribute name. The value is derived based on the cell type definition.

dataTypeSeriesFormat

<cell type="chart_text" data-format="text" alignment="left" chart-attr-name="dataTypeSeriesFormat">percent</cell>

“dataTypeSeriesFormat” is a constant attribute name. This applies data formatting to “seriesName” values. The cell type must be set to “chart_text”. The valid value is the same as those that can be defined in cell data-format.

dataTypeGroupFormat

<cell type="chart_text" data-format="text" alignment="left" chart-attr-name="dataTypeGroupFormat">currency</cell>

“dataTypeGroupFormat” is a constant attribute name. This applies data formatting to “groupData” values. The cell type must be set to “chart_text”. The valid value is the same as those that can be defined in cell data-format.

dataType

<cell type="chart_text" data-format="text" alignment="left" chart-attr-name="dataType">integer</cell>

“dataType” is a constant attribute name. This applies data formatting to “items” values. The cell type must be set to “chart_text”. The valid value is the same as those that can be defined in cell data-format.

decimalPlaces

<cell type="chart_text" data-format="text" alignment="left" chart-attr-name="decimalPlaces">2</cell>

“decimalPlaces” is a constant attribute name. This number of decimal places is applied to “items” values. The cell type must be set to “chart_text”. The Value is an integer.

Example of XML Report Definition to Generate Bar Chart JSON Data

<report>
    	<frame type="table" query-name="MajorGroupsQuery" name="barFrame">

            <bands>

                <band type="table-body">
                    <cell type="text" data-format="text" alignment="left" print-width="140" chart-attr-name="seriesName">Series1</cell> 
                    <cell type="column" data-format="currency" alignment="right" suppress-formatting="true" print-width="70">salesTotal</cell>
					
		<cell type="text" data-format="text" alignment="left" print-width="140" chart-attr-name="seriesName">Series2</cell> 
                    <cell type="column" data-format="currency" alignment="right" suppress-formatting="true" print-width="70">salesTotal</cell>
					
		<cell type="column" data-format="text" alignment="left" chart-attr-name="groupData">majorGroupNameMaster</cell>					
					
		<!-- extra cell to match count in table-column -->
		<cell type="chart_text" data-format="text" alignment="left"></cell> 
		<cell type="chart_text" data-format="text" alignment="left"></cell>
		<cell type="chart_text" data-format="text" alignment="left"></cell> 
		<cell type="chart_text" data-format="text" alignment="left"></cell>
		<cell type="chart_text" data-format="text" alignment="left"></cell> 
		<cell type="chart_text" data-format="text" alignment="left"></cell> 	 					
                </band>
				
	   <band type="table-column-header">
		 <!--  yAxisTitle chart attribute  -->
                    <cell type="text" data-format="text" alignment="left" chart-attr-name="yAxisTitle">Y Axis Title</cell>
            
		<!--  xAxisTitle chart attribute  -->
                    <cell type="text" data-format="text" alignment="left" chart-attr-name="xAxisTitle">X Axis Title</cell>
					
		<!-- hover series label attribute  -->
                    <cell type="text" data-format="text" alignment="left" chart-attr-name="hoverSeriesLabel">Test Series</cell>
					
		<!-- hover value label attribute  -->
                    <cell type="text" data-format="text" alignment="left" chart-attr-name="hoverValueLabel">Test Value</cell>
					
		<!-- hover group label attribute  -->
		<cell type="text" data-format="text" alignment="left" chart-attr-name="hoverGroupLabel">Test Group</cell>
					
		<!--  hoverBehavior chart attribute  -->
                    <cell type="chart_text" data-format="text" alignment="left" chart-attr-name="hoverBehavior">dim</cell>
					
		<!-- stackValue chart attribute  -->
                    <cell type="chart_text" data-format="text" alignment="left" chart-attr-name="stackValue">off</cell>
					
		<!-- dataType chart attribute  -->
                    <cell type="chart_text" data-format="text" alignment="left" chart-attr-name="dataType">integer</cell>
					
		<!-- decimalPlaces chart attribute  -->
                    <cell type="chart_text" data-format="text" alignment="left" chart-attr-name="decimalPlaces">2</cell>

		<!-- dataTypeSeriesFormat chart attribute  -->
                    <cell type="chart_text" data-format="text" alignment="left" chart-attr-name="dataTypeSeriesFormat">percent</cell>
					
		<!--  dataTypeGroupFormat chart attribute  -->
                    <cell type="chart_text" data-format="text" alignment="left" chart-attr-name="dataTypeGroupFormat">currency</cell>
	   </band>
        
           </bands>
        </frame>
		
    	<layout type="columner">
            <component frame-name="barFrame" column="1" visual-type="ojBar" visual-style="oj-sm-12" visual-title="TotalOperatingCosts"/>
        </layout>

</report>