Reporting Widget
Definition
The Reporting Widget is responsible for the configuration of a reporting graph.
It behaves as a standalone widget which can be referenced in any feature screen context.
Configuration
Global Properties
The configuration contains the following elements:
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
reportingId |
| YES | The id of a Reporting Object Configuration which this widget will target. The request will be executed by using the information of this configuration, such as the collection name. | - |
bordered |
| NO | Apply a border around the chart | true, false |
title |
| NO | If true, an internationalized title and subtitle will be displayed above the chart | true, false |
| YES | A ReportingWidgetContractConfiguration specifying the different criteria used by the widget for displaying the filter elements. It is also used for validating the submitted criteria. | - | |
| YES | Describes how data should be represented. | - | |
associations |
| NO | A list of "associations" between widget. When a target widget is associated, it will use the criteria of the source widget query to execute its own query. For instance a reporting widget can be associated with a list widget to display details. | - |
Contract properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
| YES | A list of criteria configurations. Note that they must be equal to the set (or a subset) of the allowed criteria of the Reporting Object Configuration referenced in | - |
Criteria properties
Each criteria will have the following configuration:
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
| YES | Configuration of one criterion. | - |
Criterion properties
Each criterion will have the following configuration:
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
name |
| YES | The name of the criterion. Must match the one in the target Collection. | - |
| NO | Configuration for the type of control in the UI. This will also be used to infer the criteria value type. | - | |
mandatory |
| NO | Indicates if a non null value must be provided at request time. If a fixed value (see below) is also provided it will fulfill the mandatory constraint. In the UI, mandatory criteria will be displayed in the order of declaration. They cannot be removed from the criteria selector. | true,false |
allowFixedValueOverride |
| NO | If true, the fixed value will only apply if the user's request does not contain the criteria. This effectively transforms the fixed value configuration into a default value configuration. | true,false |
dynamicFixedValue |
| NO | A Compute Rule specifying a fixed value for this criteria. If it is configured, the criteria will always have this value and it will not be available in the UI (unless | - |
staticFixedValue |
| NO | Alternative to | - |
displayFixedValue |
| NO | Only useful when a fixed value is provided. If true, the fixed value will be displayed in read-only instead of being hidden | true,false |
fixedMatchOperator |
| NO |
If not null, the provided comparison operator will be used instead of being inferred from the control type. | EQUALS,NOT_EQUALS, LIKE (regex matching), NOT_LIKE (regex matching), STARTS_WITH (regex matching), ENDS_WITH (regex matching), GREATER, LESS, GREATER_OR_EQUALS, LESS_OR_EQUALS, BETWEEN, IN, NOT_IN, IS_NULL, IS_NOT_NULL (Meaning that the value is not "NULL" or "" (empty string) and if the value is a list it needs to have at least one element (non empty lists)) |
| NO | Holds information for the initial and available value(s) in the UI criteria forms. | - |
Control Type properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
valueType |
| NO | Choice types (ending with _CHOICE) will require that the choice values are supplied as well (see "values" property of this object). Range type values (ending with _RANGE) will use the first and last element of the supplied choice values as lower and upper limit (in this order). OBJECT_REFERENCE type will allow to search for an object reference. Note that the search of OBJECT_REFERENCE is done "live" on the Identity Management Service at the time of search. Reporting data are "archived" data, so it is possible that a reference that is present in the reporting collection representing an object is not synchronised anymore with what this object is currently (modified, deleted, type migration etc.) Also note that it is possible to change the selected attribute when picking a result of object references using the Note that the value type of the control declared here will be used to infer the value type of the criteria to send (Ex: INTEGER_RANGE will map to a INTEGER value type criteria in the request). This value type has precedence over the type declared in the Reporting Object Configuration. | TEXT, TEXT_CHOICE, DATETIME, DATETIME_RANGE, DATE, DATE_RANGE, INTEGER, INTEGER_RANGE, INTEGER_CHOICE, FLOAT, FLOAT_RANGE, FLOAT_CHOICE, BOOLEAN, OBJECT_REFERENCE |
multivalued |
| NO | Indicates if the criteria can be multivalued. The UI will allow to input multiple values. | true,false |
objectReferenceWidget |
| NO | Must be configured when the value type is OBJECT_REFERENCE. This widget will be used for searching references. It has the same configuration as any advanced object reference widgets used in search features for instance. | - |
| NO | Sometimes a criteria value is too hard to input for a user, such as a technical code without meaningful naming. An easier way would be to provide an intermediary search for the criteria value itself (this is similar to the concept of nested object reference search used in scope widget. Example: search the technical id of the manager of user john.doe by first searching in a list of managers and selecting john.doe's one). Say we provide a | - | |
| NO | Options for the control type | - |
Reporting Reference Search properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
reportingListWidget |
| YES | An independent Reporting List Widget that can target a collection with its own criteria | - |
valuePath |
| NO | A path to the wanted value on the list result (the reporting list results are objects, this value indicates the path to the property that should be used as the value when the user select a row) | - |
i18n |
| NO | An i18n key that will have in its context the selected row. Will be used to display the selected result. | - |
Options properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
addRangePeriod |
| NO | If this option is null, a DATETIME criteria will be matched with an EQUAL operator for the single selected value. (If This may be what we want (for instance matching the date exactly). However, we might want the single datetime selection to still represent a range. Instead of displaying a range selector (using DATETIME_RANGE or DATE_RANGE) we want to allow the selection of a single date This cannot be accomplished simply by changing the operator, we need to tell the configuration that we want an automatic range. This option serves to indicate an optional amount of time to add automatically to the selected date as the upper bound of a range. Example: | - |
| NO | Allows to change the display of the period selection. Only applied when the | - |
periodSelection properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
mode |
| NO | Specify the period selection mode.
| IN_LAST, MONTH, DAY |
Values properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
dynamicInitValue |
| NO | The initial value for the filter in the UI. Only for frontend purpose. It can be changed by the end user later. This will only offer a way to prefill a criteria for the user. | - |
staticInitValue |
| NO | Alternative to | - |
dynamicChoiceValues |
| NO | Provide a list of choices when the value type is a _CHOICE. These values must be the one that exists in the Collection for this particular criteria. It is possible to retrieve values from "filters" Collections using an API. The ".filters" collections are currently not created nor updated automatically. |
CODE
|
staticChoiceValues |
| NO | Alternative to | - |
Display properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
type |
| NO | An enum of available charts | NONE (no graph), only usefull for association with other chart XY_CHART (bar chart) PIE_CHART (pie chart, the round one with slices) COUNTER_CHART (for displaying a single value) TIMELINE_CHART PLATFORM_AVAILABILITY_CHART GEO_MAP_CHART |
displayOnInit |
| NO | If true, the chart will be displayed initially without requiring to click the "Apply" button of the criteria panel first. | true, false |
| NO | Configuration for the chart legend. May not be applicable to all charts. | - | |
| NO | Control the sizing of the chart | - |
Legend properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
display |
| NO | Should the legend be displayed or not | true,false |
Size properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
cssWidth |
| NO | A CSS value for the chart width | 100% |
cssHeight |
| NO | A CSS value for the chart height | 500px |
radiusPercent |
| NO | A number between 10 and 100 that represents the radius of the chart. Only for Pie Chart. | 50 |
Additional Display Configuration
There is additional configuration elements for the display that will depend on the chart type (colors, axis, range etc.). These elements may or may not be necessary in the context of the execution.
XY chart (XY_CHART)
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
| NO | Describes a list of XY series. This type of series is defined by a unique id and a configuration for the X and Y data. | - | |
| NO | Describes the lists of X and Y axis. | - |
xySeries properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
| NO | Configuration of one xy serie. | - |
xySerie properties
Each xySerie will have the following configuration:
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
id |
| YES | A unique identifier for the serie | - |
| YES | Describe the property and axis used for the X data (horizontal) | - | |
| YES | Describe the property and axis used for the Y data (vertical) | - |
dataX and dataY
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
property |
| YES | The name of the property to use for plotting data. This can correspond to a field name in the response or an expression. Time operators
CODE
Aggregation operators Values can be aggregated inside a group using an operator. The aggregated value will be returned as a field whose name consists of the camelized concatenation of the field name and operator name.
CODE
In all cases the property must be compatible with the operator and/or axis type. | - |
axisId |
| YES | Must match to the id of an existing axis declared in the axes configuration. The series will use the axis type as its own data type, so they need to be configured in accordance. | - |
axes properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
| NO | A list of axes configuration. These axes can be used for the horizontal part of the graph. | ||
| NO | A list of axes configuration. These axes can be used for the vertical part of the graph. |
axesX or axesY properties
Each axesX or axesY will have the following configuration:
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
| NO | Configuration of one axis. | - |
axis properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
id |
| YES | A unique id that can be referenced by a series | - |
type |
| NO | The type of axis. It will also through reference be used by any series that reference this axis. | CATEGORY: For labels, textual data. Note that it can also be used for date data if the date is to be treated as a single element on chart column click (otherwise the resulting click will provide a range). DATE: For date and datetime based data. VALUE :For numeric value |
| NO | Options for the rendering of the axis | - |
rendering properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
labelRotation |
| NO | Integer from 0 to 360 to rotate the axis labels. This is useful if the labels start overlapping. Exemple: 45 will rotate the label to be slanted to the bottom right | 0 |
minGridDistance |
| NO | Set the minimum distance between grid lines. Increasing this number will result in sparser grid lines and labels. Decreasing this number will result in denser grid lines and labels. | 120 |
Pie chart (PIE_CHART)
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
| NO | Describes a list of serial series. This type of series is defined by a unique id and a configuration for the category and value | - |
pieSeries properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
| NO | Configuration of pieSerie. | - |
pieSerie properties
Each pieSerie will have the following configuration:
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
id |
| YES | A unique id for the series | - |
categoryProperty |
| YES | The name of the property to use for representing a slice of the pie chart. This can correspond to a field name in the response or an expression Example : In a data thats looks like { "country": "France", "population": 560 }, "country" is a category property. | - |
valueProperty |
| YES | The name of the property to use for representing a slice size of the pie chart. Must map to a numeric value. This can correspond to a field name in the response or an expression Example : In a data thats looks like { "country": "France", "population": 560 }, "population" is a value property. | - |
Counter (COUNTER_CHART)
When the COUNTER chart type is used, the criteria in the widget contract are just there so that an init value or a fixed value is provided to refine the aggregation request. They are not editable in the UI (no selection of criteria).
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
aggregationExpression |
| NO | An aggregation expression (sum(nb), avg(salary) etc (See "Field Operators")) that represent the UNIQUE value of this counter. Because this type of chart will not provide any group for the aggregation, it is expected that the result contains a singleton element. | - |
icon |
| NO | An icon selector (Font Awesome like "fa fa-user" or Simple line icons like "icon-user") | - |
title |
| NO | I18N key for the title of the counter | - |
text |
| NO | I18N key for a text inside the counter | - |
counterColor |
| NO | A Metronic theme CSS color name for the counter number color | dark |
borderColor |
| NO | A Metronic theme CSS color name for the border color of the counter | grey |
Geo map (GEO_MAP_CHART)
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
initialZoom |
| NO | Configure the initial zoom level of the map chart. Most tiles providers give tiles in a 256px square image. |
|
padding |
| NO | CSS padding around the map (ex: "0 20%") | - |
centerLat |
| NO | Initial latitude of the map center | 0 |
centerLong |
| NO | Initial longitude of the map center | 0 |
maxZoom |
| NO | Maximum zoom level allowed. If not filled, it will default to the maximum allowed by the tile provider | - |
minZoom |
| NO | Minimum zoom level allowed. If not filled, it will default to the minimum allowed by the tile provider | - |
propertyLat |
| YES | The property name in the document holding the latitude value |
|
propertyLong |
| YES | The property name in the document holding the longitude value |
|
propertyCity |
| YES | The property name in the document holding the city value |
|
Timeline (TIMELINE_CHART)
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
timeline |
| NO | Configuration for a timeline chart. This chart uses data that can be organized serially based on a DATETIME property. | - |
timeline properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
dateProperty |
| NO | The name of the DATETIME field in the documents that will be used for plotting the timeline | - |
timelineColor |
| NO | The color of the timeline trail as an hexadecimal string (ex: "#67b7dc") | - |
levelCount |
| NO | The number of "turns" in the timeline. Allows to increase the number of items displayed. It will often require to adjust the height of the chart as well. | - |
horizontal |
| NO | Toggle the timeline from vertical to horizontal layout | true,false |
| NO | A list of bullet configuration. | - | |
| NO | Allow to customize the initial display range of the timeline (using the range window. The range window is displayed at the top of the timeline and allows zooming on a part of the timeline). | - | |
| NO | Global configuration for all tooltips | - |
bullets properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
| NO | Configuration of one bullet. | - |
bullet properties
Each bullet will have the following configuration:
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
matchProperty |
| NO | The name of the property on the documents on which the value should be checked for comparison to determine if this bullet should be used for displaying this document (if The pair of | - |
matchValue |
| NO | The value to match in order for this bullet to be used. | - |
color |
| NO | Color of the bullet (as hex value) | #a367dc |
icon |
| NO | Font awesome CSS class for the bullet icon (ex: "fa fa-bullseye") | fa fa-bullseye |
iconColor |
| NO | Color of the icon (as hex value) | #000000 |
| NO | Configuration for the tooltip of this bullet | - |
tooltipContent properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
title |
| NO | The title of the tooltip. Can be an i18n key. | - |
subtitle |
| NO | The subtitle of the tooltip. Can be an i18n key. | - |
| NO | A section for configuring specific content that should not go in the main table. | - | |
description |
| NO | Can be i18n key. If not empty, the description will be displayed above the table | - |
textColor |
| NO | A color for the text of the tooltip (the tooltip color is inherited from the bullet "color" property). | - |
| NO | If configured allows to display a button link in the tooltip. | - | |
| NO | Configuration of a two columns table to display | - |
contextSection properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
description |
| NO | An optional description to display in this section. Can be an i18n key. | - |
| NO | Configuration of a two columns table. Same configuration as "tooltipContent.table" | - |
link properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
url |
| NO | URL to redirect. Can contain template variable. Ex: "features/myDIsplayFeature/{object.id}" | - |
linkTarget |
| NO | How to open the link (in same window or new tab) | SELF, NEW_TAB |
label |
| NO | Label of the button. Can be i18n key. | - |
table properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
| NO | A list of rows configuration (in xml each are under a <row> wrapper). | - |
rows properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
| NO | Configuration of one row of bullet tooltip table. | - |
row properties
Each row will have the following configuration:
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
title |
| NO | The key name/title. For instance "Browser". Can be i18n key. | - |
dataKey |
| NO | The path on the document containing the value to display in the second cell. For instance "user-agent.browser". | - |
type |
| NO | The type of data to display | TEXT, DATE_TIME |
dateFormat |
| NO | A recognized date format or a moment format (ex: DAY_MONTH_YEAR_LONG, L HH:mm:ss, etc.) | DAY_MONTH_YEAR_LONG |
initialRange properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
startRange |
| NO | The position of the initial left handle of the range window | 0 |
endRange |
| NO | The position of the initial right handle of the range window | 1 |
tooltipConfiguration properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
maxWidth |
| NO | Maximum width of a bullet tooltip (in pixel) | 500 |
maxHeight |
| NO | Maximum height of a bullet tooltip (in pixel) | 500 |
orientation |
| NO | VERTICAL: The tooltip is displayed above the bullet (can go out of screen) HORIZONTAL: The tooltip will try to place itself horizontally, taking the viewport space into account | VERTICAL, HORIZONTAL |
Associations
Property | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
widgetId |
| YES | The target widget id. Must match one that is configured in the same feature | - |
allowEditCriteria |
| NO | Indicates if the target widget (referenced by widgetId) is allowed to propose an "Edit filters" button to edit the criteria provided by the association and/or to add new criteria. | true, false |
| NO | Options for the association propagation | - | |
| NO | Criteria used by different collections will mostly have a different name/path.
CODE
If the forwarded value should be replaced, the "conversion" property allows to do that.
CODE
In this case, the association will forward a criteria "user-agent.browser.family" with the static value "CHROME" instead of the value of the original criteria. | - |
Propagation properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
strategy |
| NO |
Some widgets can ignore the strategy if their behavior cannot be different (counter chart for instance). | ALWAYS, SELECTION |
criteriaMapping properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
| NO | Configuration of one criteria mapping. | - |
mapping properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
source |
| YES | The name of the criteria in the source widget. It is possible to declare a source criteria that does not exists on the source widget filter contract. This case happens when the criteria is received from data and needs to be passed. This can also be used when clicking a reporting list row to transfer data results as criteria, even though the list does not allow to filter on those criteria itself. | - |
target |
| YES | The name of the criteria in the listener widget. Unlike the source criteria, the target criteria name must be part of the filter contract of the target widget. This is because the target widget will use the received value for filtering. | |
| NO | Allow to convert the value forwarded by the association. |
conversion properties
Property Name | Type | Mandatory | Description | Values (default values in bold) |
---|---|---|---|---|
staticValue |
| NO | If not null, the association will replace and forward this value instead of the original value of the source criteria. | - |