Datalogger
The Datalogger object allow to gather, process and visualize statistical data on the
variations of a data set.
Data loggers collect data and group them in order to visualize the trends in charts for
each data interval (or group of hours, or ) of the current and past day, each day of the
current and past month, and each month of the current and past year. It is also possible
to have an higher resolution of a single minute, but this implies a notably higher disk
space usage.
Further, they allows for the logging of every processed value as CSV file.
[Datalogger declaratiom
tutorial](/06-tutorials/02-projects/datalogger/define-a-counter-and-a-range-data-logger.md)
[Datalogger counter
tutorial](/06-tutorials/02-projects/datalogger/datalogger-counter.md)
Attributes
Common
ID
Sets the object's ID.
The ID identifies the object and is used to reference it in UISet actions, allowing to change its attributes dynamically.
The ID is not unique, it can be shared among multiple objects to quickly change a common attribute.
IDs can't be changed with a UISet action, but they can have a Value Binding assigned to them. Value Bindings on IDs allow an object to be dinamically attached to a set of attribute values.
E.g. the following Value Binding switches the ID of the object between mybutton1
and mybutton2
based on the value of the UISet button.address
:
Value binding:
="mybutton" + ui('button', 'address')
UISet:
UISet('button', 'address', '1')
switches the ID to mybutton1
UISet('button', 'address', '2')
switches the ID to mybutton2
Position and Size
Position
Sets the object's position.
The default
value is: x0y0
.
Attribute Values
Value | Description | Example |
---|---|---|
x<left>y<top> | Specify left/top coordinates in pixels. | x10y20 |
Flex Grow
Specifies if the objects should grow to fill the available space.
The default
value is: true
.
Attribute Values
Value | Description |
---|---|
true | Default value. Objects expand to fill the available space. |
false | Objects do not grow to fill the available space. |
Flex Shrink
Specifies if the objects should shrink to fit the available space.
The default
value is: true
.
Attribute Values
Value | Description |
---|---|
true | Default value. Objects shrink to fit the available space. |
false | Objects do not shrink to fit the available space. |
Width
Sets the object's width in pixels.
Minimum value is 1.
Height
Sets the object's height in pixels.
Minimum value is 1.
Datalogger
Logger ID
List of IDs, to change it dynamically.
Attribute Values
Value | Description |
---|---|
<comma-separated list> | List of datalogger IDs, to change it dynamically. |
Mode
Selects live mode or browser mode.
The default
value is: live
.
Attribute Values
Value | Description |
---|---|
live | Default value. Live mode. |
browser | Browser mode. |
liveonly | Locks the interface in live mode. It will hide the browser/live button on the UI. |
browseronly | Locks the interface in browser mode. It will hide the browser/live button on the UI. |
List
Specifies a list of IDs of dataloggers selectable by the user. Shows an icon in the control bar that displays the list.
Attribute Values
Value | Description |
---|---|
<comma-separated list> | List of datalogger IDs. |
Range Groups
Specifies a lilst of group of names, , one for each datalogger id (specified in list or in loggerid, if the list is empty). Dataloggers with the same group name are grouped together in a single range.
Attribute Values
Value | Description |
---|---|
<comma-separated list> | List of group names. |
Slot
Shows a specific slot, from 0 to the number of slots-1.
Attribute Values
Value | Description |
---|---|
<number> | Slot index, from 0 to the number of slots-1. |
Group
Name of a group. Dataloggers with the same group are synchronized (controlling one affects the others).
Attribute Values
Value | Description |
---|---|
<string> | Name of a group. |
Names
Specifies the dataloggers names (relative to the list attribute or, if list is empty, the loggerid attribute), displayed in the legend, list popup and csv header.
Attribute Values
Value | Description |
---|---|
<comma-separated list> | Sets the datalogger names. |
Units
Specifies the units to display on the top left of each chart. If the datalogger has slots, one unit for each slot. If there are multiple datalogger ids, one unit for each datalogger.
Attribute Values
Value | Description |
---|---|
<comma-separated list> | Units to display. |
Notches
Specifies the number of notches on the y-axis.
The default
value is: false
.
Attribute Values
Value | Description |
---|---|
<value> | Number of notches on the y-axis. |
Controls
Controls
Specifies the object's controls.
The default
value is: none
.
Attribute Values
Value | Description |
---|---|
none | Default value. Don't show any controls. |
tabs | Show tabs on live mode for scale and slots. |
toolbar | Show a toolbar to control live and browser modes. |
HD
Controls the HD mode, or shows an HD icon that lets the user toggle HD on and off.
The default
value is: false
.
Attribute Values
Value | Description |
---|---|
false | Default value. Disables HD. |
true | Enables HD. |
toggle | Shows an HD icon that lets the user toggle HD on and off. |
Fullscreen
Enables or disables fullscreen mode.
The default
value is: false
.
This attribute is live
. It can't be set from the Project Editor, it needs to be set dynamically with a UISet.
Attribute Values
Value | Description |
---|---|
false | Default value. Disables fullscreen mode. |
true | Enables fullscreen mode. |
Time
Scale
Specifies the scale of the data to display.
The default
value is: year
.
Attribute Values
Value | Description |
---|---|
year | Default value. Set the live scale to year. |
month | Set the live scale to month. |
day | Set the live scale to day. |
hour | Set the live scale to hour. |
Browser Date
Sets the browser's date and time.
Attribute Values
Value | Description |
---|---|
yyyy | Specify a year. |
yyyymm | Specify year and month. |
yyyymmdd | Specify year, month and day. |
yyyymmddhh | Specify year, month, day and hour. |
Browser Scale
Sets the browser's scale, if in browser mode.
When toggling between browser and scale mode, the initial browser's scale is the same as the live scale.
This attribute is live
. It can't be set from the Project Editor, it needs to be set dynamically with a UISet.
Attribute Values
Value | Description |
---|---|
10y | Set the live scale to 10 years. |
year | Set the browser scale to year. |
month | Set the browser scale to month. |
day | Set the browser scale to day. |
hour | Set the browser scale to hour. |
By Month
Shows or hides monthly data (days).
The default
value is: true
.
Attribute Values
Value | Description |
---|---|
true | Default value. Show monthly data (days). |
false | Hide monthly data. |
By Day
Shows or hides daily data (hours).
The default
value is: true
.
Attribute Values
Value | Description |
---|---|
true | Default value. Show daily data (hours). |
false | Hide daily data. |
By Hour
Shows or hides hourly data (minutes).
The default
value is: true
.
Attribute Values
Value | Description |
---|---|
true | Default value. Show hourly data (minutes). |
false | Hide hourly data. |
By Minute
Shows or hides minute data (seconds).
The default
value is: true
.
Attribute Values
Value | Description |
---|---|
true | Default value. Show minute data (seconds). |
false | Hide minute data. |
Charts
Type
Specifies the chart type.
The default
value is: bars
.
Attribute Values
Value | Description |
---|---|
bars | Default value. Draw bars. |
points | Draws points. |
line | Draws a line connecting the values. |
spline | Draws a spline connecting the values. |
pie | Draws a pie chart, each slice representing a datalogger (if multiple dataloggers are visible), or past/present values. Percentage is shown in the legend. |
Avg Values
Displays the average values, if in range mode.
The default
value is: true
.
Attribute Values
Value | Description |
---|---|
true | Default value. Show average values, if in range mode. |
false | Hide average values. |