Dashboards¶
Generate the data required to display a dashboard, response data contains all information required for displaying the dashboard. The response may be quite large, depending on the dashboard that is requested. Charts especially may contain a large number of points.
HTTP Request¶
GET /icweb.dll/dashboard/{key}
POST /icweb.dll/dashboard/{key}
Dashboard¶
Contains the data associated with a dashboard, there is a name as well as a list of elements, each element identifies an element in the dashboard, these elements are extensible, and can be customised by the user within NEXUS IC itself.
| Name | Type | Description | Optional |
name |
string | Name of the dashboard | No |
elements |
Dashboard Element [] | List of elements in the dashboard. | No |
Dashboard Element¶
Specifies an element in the dashboard, each element contains some base configuration, but each element also contains a data element, and the contains of this JSON object is based entirely on the type of dashboard element. Those elements that you don’t understand can be skipped and not displayed.
| Name | Type | Description | Optional |
caption |
string | Caption used for the dashboard element. | No |
type |
string | Specifies the type of element this represents.
|
No |
data |
object | Contains the data associated with the element, this is dependant on the element type defined in type |
No |
Table Element¶
Contains the data for a table, a table can be either a normal table, a vertical table or a pivot table. A table may not have any columns, categories or rows, but will have at least columns or ``rows defined.
It is assumed that the columns and rows are in matched order, so the first item in each TableRow is the value for the first column.
| Name | Type | Description | Optional | Default |
sourceBusinessObject |
String | If there are source rows for Table Row entries, then this will contain the name of the business object that the key values are from. | Yes | null |
columns |
Table Column [] | Contains a list of columns for the table. | Yes | |
categories |
Table Category [] | Contains a list of optional categories for the table columns, generally this are output above the columns, grouping them together. | Yes | |
rows |
Table Row [] | Contains the rows of data for the table. | Yes |
Table Column¶
| Name | Type | Description | Optional | Default |
caption |
String | Caption for the column. | No | |
alignment |
String | Specifies the way the caption should be align, center, right, left. |
Yes | left |
Table Category¶
| Name | Type | Description | Optional | Default |
caption |
String | Caption for the column. | No | |
spanColumns |
Integer | Number of columns this category spans. | Yes | 1 |
alignment |
String | Specifies the way the caption should be align, center, right, left. |
Yes | left |
Table Row¶
| Name | Type | Description | Optional | Default |
cells |
Table Cell [] | Contains the data for each of the cells of the Table Row. | No | |
sourceKey |
Integer | Contains the primary key for the source row applicable to this Table Row. | Yes | null |
Table Cell¶
| Name | Type | Description | Optional | Default |
value |
String | Contains the value for the column, if a datetime, contains an ISO 8601 formatted date/time. If the time is 00:00:00 it should be omitted from display. | No | |
alignment |
String | Specifies the way the cell value should be align, center, right, left |
Yes | left |
sourceBusinessObject |
String | If there are source rows for this Table Cell then this will contain the name of the business object that the key values are from. | Yes | null |
sourceKey |
Integer [] | Contains 0 or more primary key values for the source rows applicable to this Table Cell. | Yes | null |
Image Element¶
Contains an embedded image, with a caption, should be displayed to the end-user with no interactivity.
| Name | Type | Description | Optional | Default |
type |
String | Mime Type of format of image. | No | |
image |
String | Base64 encoded imaged | No |
Chart Element¶
Specifies the data that is produced when the dashboard element is a chart, a chart can be rendered as either a table of data or a chart itself, decision should be made by the client. A chart element may contain more than 1 Chart, if more than one is output then the Charts will take on the same structure, they will just contain a differing set of data.
| Name | Type | Description | Optional | Default |
charts |
Chart [] | 1 or more charts defined in this Chart Element. | No |
Chart¶
Contains a the data for a single chart, for the Chart Element. Each chart can have 1 x and y axis, and then 1 or more series. Eachs series will have a specific type, such as bar, line etc and contain the data for that series.
| Name | Type | Description | Optional | Default |
x-axis |
Chart Axis | Defines the x-axis for this chart. | No | |
y-axis |
Chart Axis | Defines the y-axis for this chart. | No | |
series |
Chart Series [] | Defines the series data for this chart. | No | |
seriesSources |
Chart Series Source [] | Defines the source data used for each of the chart series. | No | |
zoomBar |
Boolean | Determines if a zoombar is visible. | Yes | No |
Chart Axis¶
Chart Axis defines the specific axis for a chart, such as title and format of data.
| Name | Type | Description | Optional | Default |
title |
String | Title for the axis. | Yes | null |
autoScale |
Bool | Specifies whether this axis should auto-scale to fit the data. | Yes | True |
scale |
Float | When autoScale is False, then this contains the scale at which the axis should display the data. |
Yes | null |
format |
String | Specifies the type of data in the axis, float, int, datetime, string. | No | |
granulation |
Integer | Where this is a risk chart, this specifies the number of sections on the axis that have defined ticks. | No | |
labels |
String[] | Specifies the labels of each section on the axis, used in conjunction with granulation. |
No |
Chart Series¶
Contains the data for each chart series. A chart series is visually defined by the type that determines how the series points should be displayed to the user.
| Name | Type | Description | Optional | Default |
type |
String | Type of Series, point, line, bezier, bar, gantt, verticalLine, horizontalLine, pie, disjointedLine, histogram, shadedSection, polygon, minMax, average, standardDeviation, trendFirstLast, trendLastTwo, trendAll, leastSquares, heatMap | No | null |
id |
String | Contains a global unique identifier to allow matching to the seriesSources containing the source rows used to generate the series data. |
No | null |
name |
String | Name of the series, to be shown in any legend. | Yes | null |
colour |
String | Web Colour | Yes | null (use series colour) |
points |
Chart Point [] | Contains the series points to be displayed in the chart series. | No | |
opacity |
Float | 0 to 1 determining the opacity of the point, 0 is completely transparent, 1 is not transparent at all. | Yes | 1 |
pointStyle |
String | Style of points for series that have points, circle, square, diamond, cross | Yes | null |
border |
Bool | For points, should a border be painted. | Yes | True |
pointSize |
Number | Size of points, in pixels. | Yes | 1 |
displayPoints |
Bool | For line series, do we show points for each point on the line. | Yes | False |
shaded |
Bool | Should the space between the line and where X = 0, be shaded. | Yes | False |
showMesh |
Bool | For heatMap and contour series, should a mesh be shown. | Yes | False |
ganttStyle |
String | For Gantt charts, should it be painted as line or bar. | Yes | bar |
shadeInside |
String | For shaded section series, should the shading occur between the bound lines, or outside the bounding lines. | Yes | False |
gradient |
Float | For trend line chart series, this specifies the gradient of each line, if 0, then the trend line is horizontal. | Yes | 0 |
Chart Point¶
Contains the data for each series point. Depending on the series type, it may contain different fields
| Name | Type | Description | Optional | Default |
opacity |
Float | 0 to 1 determining the opacity of the point, 0 is completely transparent, 1 is not transparent at all. | Yes | 1 |
label |
String | Point Label | Yes | null |
id |
Number | Unique key for this point in this series. | Yes | 0 |
colour |
String | Web Colour | Yes | null (use series colour) |
x |
Float | X-Value | Yes | null |
y |
Float | Y-Value | Yes | null |
z |
Float | Z-Value | Yes | null |
x2 |
Float | Secondary X-Value | Yes | null |
y2 |
Float | Secondary Y-Value | Yes | null |
z2 |
Float | Secondary Z-Value | Yes | null |
coordinates |
Coordinate [] | Polygon series require an array of X,Y points to plot the polygon. | Yes | null |
Chart Series Source¶
Contains the data for the raw data used to generate the chart series.
| Name | Type | Description | Optional | Default |
seriesId |
String | Series identifier to match to the chart series | No | |
sources |
Chart Point Source [] | Contains a list of sources for each point. This may not contain an item for each point in the chart series if the source isn’t able to be determined. | Yes | null |
Chart Point Source¶
Contains the data for a single point in a chart series. To match a chart point to a point source, the seriesId and pointId need to both match to first find the Chart Series Source and then the corresponding Chart Point Source
| Name | Type | Description | Optional | Default |
pointId |
Number | Id of the point this source corresponds to. | No | |
sourceBusinessObject |
String | Name of the business object the sourceKey are contained in. | No | |
sourceKey |
Number [] | List of 0 or more keys that were used to generate the chart series point. | Yes | null |
Coordinate¶
Simple array of X,Y coordinates for polygon series.
| Name | Type | Description | Optional | Default |
x |
Float | X-Value | Yes | null |
y |
Float | Y-Value | Yes | null |
Paragraph Element¶
A paragraph element contains text, generally it does not have a title for the dashboard element, the text may be formatted. It may contain 1 or more paragraphs within it.
| Name | Type | Description | Optional | Default |
text |
Paragraph Text [] | Contains the values for the paragraph. | No |
Paragraph Text¶
Specifies text within a paragraph, including any styling.
| Name | Type | Description | Optional | Default |
value |
String | Contains a text string for a paragraph. | Yes | |
color |
String | Contains a web colour in #AARRGGBB form. | Yes | |
alignment |
String | Alignment, left, center, right. | Yes | left |
text-bold |
Bool | Determines if the text is bold. | Yes | False |
text-underline |
Bool | Determines if the text is underlined. | Yes | False |
text-italic |
Bool | Determines if the text is italic. | Yes | False |
text-size |
Bool | Determines the point size of the text | Yes |
Section Element¶
Specifies a new section starts in the elements, allowing the section to define the number of columns the elements are displayed in
| Name | Type | Description | Optional | Default |
columns |
Integer | Number of columns the elements should be split into. Columns are consumed, top to bottom, left to right. | Yes | 1 |
Example¶
Generate and return the dashboard for the dashboard identified by the key of 3
Request¶
GET /icweb.dll/dashboard/3
Response¶
{
"name": "Test Dashboard",
"elements": [{
"type": "section",
"data": {
"columns": 2
}
}, {
"type": "table",
"caption": "Workpack Listing",
"data": {
"columns": [{
"caption": "Name"
}, {
"caption": "Description"
}, {
"caption": "Read Only"
}, {
"caption": "Actual Start",
"alignment": "right"
}, {
"caption": "Hours (per day)",
"alignment": "center"
}, {
"caption": "Workpack Group"
}
],
"rows": [{
"cells": [{
"value": "Workpack A"
}, {
"value": "This is the description for WA"
}, {
"value": "No"
}, {
"value": "2019-08-26T00:00:00.000Z",
"alignment": "right"
}, {
"value": "8",
"alignment": "center"
}, {
"value": "Group A"
}
]
}, {
"cells": [{
"value": "Workpack B"
}, {
"value": "This is the description for WB"
}, {
"value": "No"
}, {
"value": "2019-08-26T00:00:00.000Z",
"alignment": "right"
}, {
"value": "6",
"alignment": "center"
}, {
"value": "Group B"
}
]
}
]
}
}, {
"type": "paragraph",
"data": {
"text": [{
"value": "The above table displays all workpacks.\r",
"color": "#0055FF3A",
"alignment": "center",
"text-bold": true
}, {
"value": "There should be 2 workpacks in this test."
}
]
}
}, {
"type": "image",
"caption": "Drawing Details",
"data": {
"type": "image\/png",
"image": "iVBORw0KGgoAAAANSUh..."
}
}, {
"type": "chart",
"caption": "Test Chart",
"data": {
"charts": [{
"x-axis": {
"title": "Anomaly Code",
"format": "label"
},
"y-axis": {
"title": "Count",
"format": "integer"
},
"series": [{
"id": "{860BF005-A81D-45A9-B57E-7F0497347442}",
"type": "pie",
"name": "Anomaly Code",
"points": [{
"label": "C3",
"id": 3,
"x": 3,
"y": 1
}, {
"label": "C2",
"id": 2,
"x": 2,
"y": 2
}, {
"label": "C1",
"id": 1,
"x": 1,
"y": 3
}
]
}
],
"seriesSources": [{
"seriesId": "{860BF005-A81D-45A9-B57E-7F0497347442}",
"sources": [{
"pointId": 3,
"sourceBusinessObject": "Anomaly",
"sourceKey": [6]
}, {
"pointId": 2,
"sourceBusinessObject": "Anomaly",
"sourceKey": [4, 5]
}, {
"pointId": 1,
"sourceBusinessObject": "Anomaly",
"sourceKey": [1, 2, 3]
}
]
}
]
}
]
}
}
]
}