Technologies > User Interface Add-Ins > Drawing Views > Thematically Highlight Drawing
This example thematically highlights rooms according to department.
In the highlight data source, the legend key is assigned the attribute legendKey="true"
. Here the room table has been joined with the department table to access the highlight color palette stored in the department's hpattern_acad
field:
<dataSource id="reportInPanel_highlightDepartmentsDs" type="DrawingControlHighlight">
<table name="rm" role="main"/>
<table name="dp" role="standard"/>
<field table="rm" name = "bl_id"/>
<field table="rm" name = "fl_id"/>
<field table="rm" name = "rm_id"/>
<field table="dp" name="name" legendKey="true"/>
<field table="dp" name="hpattern_acad"/>
</dataSource>
In the drawing panel definition, by setting thematicHighlightStyle
to predefined
(the default value), assets are highlighted thematically according to the highlight data source's hpattern_acad
field:
<panel type="drawing" id="reportInPanel_cadPanel" layoutRegion="row1col2"
highlightDataSource="reportInPanel_highlightDepartmentsDs"
labelsDataSource="reportInPanel_labelNamesDs"
thematicHighlightStyle="predefined">
<title translatable="true">[]</title>
</panel>
If no predefined color values exist, colors are chosen automatically on the fly. The following highlight data source does not have a predefined color palette. The room restriction highlights those rooms which are vacant (rm.em_count
=
0
):
<dataSource id="highlightVacantRoomsDs" type="DrawingControlHighlight">
<table name="rm" role="main"/>
...
<field table="rm" name = "rm_id"/>
<field table="rm" name = "count_em" legendKey="true"/>
<restriction type="parsed">
<clause relop="AND" op="=" value="0" name="count_em" table="rm"/>
</restriction>
</dataSource>
These and other commonly-used highlight data sources can be found in ab-datasource-highlights.axvw
and incorporated into the AXVW by including a view panel:
<panel type="view" id="highlightStylesView" file="ab-datasource-highlights.axvw"/>
See "Use highlight and label data sources"
View: http://localhost:8080/archibus/schema/ab-products/solutions/drawing-flash/ab-report-in-panel-drawing.axvw