The Realtime chart and Historic chart components are designed to display graphs of data coming from data sources.
Realtime chart component - displays data coming in real time. Initially, the chart is empty, but with the arrival of new data, it is added to the chart. The data for the last configured amount of time is displayed. Older data is removed from the chart. Because new data may not come from the data source, if it remains unchanged, then for convenience, an optional function is provided for adding fake points that duplicate the old ones in value periodically.
Historic chart component - displays data stored on the Webdata.live database servers. When new data arrives, it is not automatically updated on the chart, but the data can be examined by selecting the period of interest to display.
Components allow you to display multiple series of data at the same time. In this case, two data series can either be on a same or on a different Y axes.
Both components are very similar in setup:
If you put them on the form and look into the structure, you can see that:
The main properties are combined in the "chart" group:
Chart title
- chart titleShow legend
- show/hide the legendShow export button
- show a button that allows you to export visible data (in png, csv, xls format)Amount of Y Axis
- the number of Y axes. Changing the parameter adds or removes the Y axes from the chart (and their series with them)Input enabled
- only for HistoricChart - show or hide fields for entering date rangeHide reset zoom
- only for HistoricChart - allows you to disable the display of the "Restore zoom" buttonProperties related to the "tooltip", which displays values when hovering over series points, for a chart:
Enabled
- enable or disable tooltipsPosition
- location for tooltipBorder color
- tooltip frame colorBorder radius
- border radius of a tooltip (in percent)Border width
- tooltip border width (in pixels)Shadow
- whether to cast a shadow for the tooltip frameHide delay
- tooltip will hide after this time (ms)The ChartXAxis and ChartYAxis properties are very similar, all of the following properties apply to both of them, with a few exceptions which will be mentioned later. All the main properties of the axes are collected in the "axis" group:
Crosshair
- whether to display a crosshair that will follow the mouse pointerLine color
- axis line colorLine width
- axis line widthOffset mode
- axis offset mode from the chart area, automatic "auto" or manual "manual"Offset
- offset (in pixels) from the axis to the plot area, if the manual offset mode is usedOpposite
- by default, the Y-axis is located on the left of the chart, the X-axis is on the bottom of the chart. This parameter allows you to change the standard side of the axis position if you set the value to "true"Reverse
- by default, values increase from bottom to top on the Y axis, and from left to right on the X axis. This parameter allows you to flip the direction of the axis, if you set the value to "true"Visible
- The property allows to hide ("false") or show the axis ("true"). Axis is visible by defaultThe properties of the subgroup "axis"."gridline" set the parameters for displaying grid lines. There are primary and minor grid lines. Grid lines are drawn on the plotting area and the primary ones start from the main ticks, the secondary ones start from the secondary ticks:
Color
- color of primary grid linesDash style
- drawing style of the primary lines: more than 10 different options, from solid to dash-dot typesWidth
- thickness of primary lines drawingthe same parameters in this group, with the prefix "Minor" in the property name - refer to the rendering of minor grid lines
The properties of the "axis"."ticks" subgroup set the parameters for displaying tick marks on the axis. Ticks can be major and minor.
Color
- color for drawing major ticksInterval mode
- Sets the interval mode for drawing tick marks, either "auto" or "manual"Interval
- If manual interval mode is selected for drawing ticks , then this parameter sets the interval of ticksPosition
- position of ticks relative to the axis, either "outside" or "inside"Width
- width of ticksLength
- length of ticksthe same parameters in this group, with the prefix "Minor" in the property name - refer to the rendering of minor ticks
The properties of the subgroup "axis"."ticks labels" set the parameters for displaying the labels of the values of the main ticks of the axis:
Enabled
- allows "true" or disables "false" display of axis tick valuesAlign
- aligns labels to the "left", "right" or "center"X Y Mode
- alignment of labels relative to tick marks either "auto" (by default) or "manual"X
- sets the horizontal offset of the label by the specified value (pixels), if the manual mode for aligning tick labels is selectedY
- sets the vertical offset of the label by the specified value (pixels), if the manual mode for aligning tick labels is selectedFormat
- allows you to set the formatting for displaying the values of the main ticks of the axis. Empty by default, you can specify some format, for example {value:.1f} - for a fixed output of 1 decimal placeRotation
- allows you to rotate the labels by the specified angle (in degrees). Default 0Step
- step for displaying labels. The default value is 1 - i.e. each major tick will have a value. If you put 2 here, then only every second major tick will have a valueThe properties of the "axis"."title" subgroup set the parameters for displaying the axis title:
Align
- alignment of the text with the axis title relative to the axis: possible values: "low" - closer to the origin, "middle" - in the middle of the axis, "high" - closer to the end of the axisMargin
- you can control the offset of the axis label from the axis (in pixels)Rotation
- you can control the rotation angle of the axis label (in degrees), for the Y axis it is 270 by default, and for the X axes it is 0Title
- axis title text-"axis".Amount of series
- controls the number of child ChartSerie components, which are responsible for setting the data series output to this axis
-"axis".Min-Max mode
- minimum and maximum value mode. The default is "auto" - i.e. the axis is automatically scaled according to the displayed values. If you put "manual" then in the "axis".Min
and "axis".Max
parameters you can set the scale manually by specifying the minimum and maximum values for the axis.
"bands" property group - combines settings for displaying colored bands passing through the plotting area and denoting ranges of axis values:
Plot bands num
- parameter sets the number of groups of "band" settings. Up to 8 groups can be specified.Parameters of each group:
Border color
- band border colorBorder width
- thickness of the band borderColor
- band background colorFrom
- the value of the beginning of the range on the Y axisTo
- the value of the end of the range on the Y axisWindow in sec
- trends for the last specified number of seconds will be displayedForce interval sec
- the interval for adding fake points, for a case when there is no new data from the data source,Settings group "axis"."interval" - sets the initial date range for display
Interval type
- interval type, either "relative", or "fixed"if a fixed interval type is specified:
Time start
- string with start timeEnd start
- string with end timeif the relative type of the interval is set, you need to adjust the type of time units, the number of units, how to count the units.
Time unit
- type of time unit: you can choose from a second to a year: "second", "minute", "hour", " day", "week", "month", "quarter", "year"Unit
- indicates the number of selected time unitsCount from
- sets the rule for calculating the initial moment of time using the selected time unit. The end point in time is obtained by counting back from the initial specified number of selected time units:The main setting of the ChartSerie component is in the "tag" group and allows you to bind data to a chart
Data source
- name of available data sourceDevice
- device name inside the data sourceTag name
- tag name inside data source deviceAll other series settings affect the display details of the series.
"serie".Serie type
- series type, data display as:
"serie".Allow point select
- whether to allow the user to select points - "false" or "true"
Color
- series line colorDash style
- series line drawing style: more than 10 different options, from solid to dash-dot typesEnable mouse tracking
- allows you to disable or enable mouse response to display tooltips. It can be useful to turn it off when displaying a lot of data to improve the responsiveness of the interface.Line width
- series line drawing width (in pixels)"serie".Symbol
- the shape of the marker that will be displayed in place of the points of the series if there is enough space to display
"serie".Name
- The name of the series that is displayed in the legend
Shadow
- if "true", then the series will cast a shadowShow in legend
- if "true", it will be displayed in the legendVisible
- if "true", then the series will be visible, otherwise hiddenThe "serie"."data labels" group combines properties for drawing labels with values above the series points in the plotting area:
Enabled
- value "true" - labels with values will be drawnAlign
- label alignment relative to the point, center/left/rightBackground color
- background color of the label with textBorder color
- label frame color with textBorder radius
- number-percentage of roundness of the frame with the labelBorder width
- thickness of the label frame with the value (in pixels)Color
- text font color with valuesFormat
- output format. e.g. {y:.2f} - displays 2 decimal placesShape
- shape of labels background - circles/squares/diamonds/trianglesX
- horizontal offset of the label to the point (in pixels)Y
- vertical offset of the label to the point (in pixels)"serie"."marker usual", "serie"."marker hovered", "serie"."marker selected" property groups - determine the presence and appearance of the series "markers" - how the graph points will look in three states: "marker usual" - in the normal state, "marker hovered" - in the state when the mouse cursor is over the point, "marker selected" - when the user clicked on the marker. in each group, the set of properties is as follows:
Enabled
- enables or disables the display of the marker symbol for the seriesFill color
- background color of marker symbolLine color
- border color around marker characterLine width
- width of the border around the marker character (in pixels)Radius
- marker radius (in pixels)The group of properties "serie"."tooltip" combines the properties of the tooltip that occurs at the points next to the mouse cursor:
Value decimals
- the number of decimal places after the decimal separator of the valueValue prefix
- prefix string (what will be before the value) in the tooltipValue suffix
- suffix string (what will be after the value) in tooltipDate format
- date format in the tooltip, for example, you can enter the values %Y-%m-%d, to display only the date without the time