HTML Chart Control

Use a calculated field in a chart

Technologies > User Interface Add-Ins > HTML Chart Views > Column Chart of One Calculated field Summarized by One Group

The following example shows total room area, a calculated field, on the data axis. The values are grouped by room standard. Note that the data source has been set to type="grouping" and the room standard field in the data source has been set to groupBy="true" :

<view version="2.0"> <title>Column Chart of One Calculated field Summarized by One Group</title> <dataSource id="chartCalcValCol_ds" type="grouping"> <table name="rm"/> <field table="rm" name="rm_std" groupBy="true"/> <!-- define the calculated field --> <field name="total_area" formula="sum" baseField="rm.area" dataType="number" size="6" decimals="0"> <title>Total Area</title> </field> <sortField table="rm" name="rm_std" ascending="true"/> </dataSource> <panel id="chartCalcValCol_chart" type="htmlChart" controlType="columnChart" dataSource="chartCalcValCol_ds" legendLocation="bottom" showLegendAsPopUp="false"> <title>Total Room Area By Room Standards</title> <groupingAxis table="rm" field="rm_std" labelRotation="45"> <title>Room Standards</title> </groupingAxis> <dataAxis table="rm" field="total_area" autoCalculateTickSizeInterval="false" tickSizeInterval="150" displayAxis="true"> <title>Total Area</title> </dataAxis> </panel> </view>

Example view: http://localhost:8080/archibus/schema/ab-products/solutions/parts/htmlchart/ab-ex-htmlchart-calculated-value-column.axvw