CSBar QML Type
Display a bar that expands or contracts when value changes. More...
Import Statement: | import CSDataQuick.Components 1.0 |
Inherits: |
Properties
- direction : enumeration
- fillMode : enumeration
- label : enumeration
- labelStyle : int
Detailed Description
The Bar Monitor can have several decorations as specified by the labelStyle. It can go up, down, left, or right, as specified by the direction property. It can start from the edge or from the center, as specified by the fillMode property. The Bar Monitor with the labelStyle set to LabelStyle.None can be used to make bar graphs.
CSBar { source: 'catest' labelStyle: LabelStyle.Outline direction: Direction.Up }
Property Documentation
Indicate the maximumValue position.
- Direction.Up
- Direction.Right
- Direction.Down
- Direction.Left
By Direction.Up, the minimumValue is at the bottom and maximumValue at the top. And by Direction.Right, the minimumValue is at the left and maximumValue at the right. The other two reverse the direction.
Set the bar start postion.
- FillMode.FromEdge - the default
- FillMode.FromCenter
If the fill mode is FillMode.Edge, the bar starts from where the minimum value is. And the length, in percentage, is calculated by (value - minimumValue) / (maximumValue - minimumValue).
In FillMode.Center mode, the bar starts from where the middle point is, i.e. (maximumValue - minimumValue) / 2. And the length, in percentage, is calculated by (value - middleValue) / (maximumValue - minimumValue) / 2. If the value is less than middle point, the bar is towards minimum value.
Row { CSBar { source: 'catest' labelStyle: LabelStyle.Outline fillMode: FillMode.FromEdge } CSBar { source: 'catest' labelStyle: LabelStyle.Outline fillMode: FillMode.FromCenter } }
The decoration mode.
- LabelStyle.Frame - No extra features.
- LabelStyle.None - Same as LabelStyle.Frame.
- LabelStyle.Outline - Show the limits.
- LabelStyle.Limits - Show limits and a box for the value.
- LabelStyle.Channel - In addition to LabelStyle.Limits, show the process variable name.
The decoration mode.
- LabelStyle.Frame - No extra features.
- LabelStyle.None - Same as LabelStyle.Frame.
- LabelStyle.Outline - Show the limits.
- LabelStyle.Limits - Show limits and a box for the value.
- LabelStyle.Channel - In addition to LabelStyle.Limits, show the process variable name.