The Legend UI element allows you to display a descriptive text for different colors used in an assigned UI element. The Legend element can be positioned anywhere in the view and be assigned to a table or a DateNavigator.
The screen shot below shows a DateNavigator element with assigned legend.
Assigning the Legend element
In the view, after the DateNavigator element insert a Legend element and assign it to the DateNavigatorelement by setting the ID of the Legend element as the legendID property of the DateNavigatorelement.
You can insert a Legend element after the table and use the legendId property to assign it to the table. To position the Legend element at the bottom of the table, you can use the LegendPopin. Insert a LegendPopin into the table and a content into the LegendPopin. Then insert a Legend element into the content.
The color assignment of the LegendItem is carried out using the enumeration type WDTableCellDesign. The following properties are of this type:
A Legend is composed of LegendItems.
Determines the number of columns in which LegendItems are displayed.
Determines the width of the Legend, which you can specify in relative CSS units like em, ex, or percentage.
Name |
Interface |
Type |
Initial Value |
Bindable |
colCount |
IWDLegend |
int |
1 |
bindable |
enabled |
IWDUIElement |
boolean |
true |
bindable |
tooltip |
IWDUIElement |
String |
|
bindable |
visible |
IWDUIElement |
WDVisibility |
visible |
bindable |
width |
IWDLegend |
String |
100% |
bindable |