BarSet QML Type
Building block for different bar charts. More...
Import Statement: | import QtCharts 2.1 |
Instantiates: | QBarSet |
Properties
- borderColor : color
- borderWidth : real
- brushFilename : QString
- color : color
- count : int
- label : string
- labelColor : color
- labelFont : Font
- values : QVariantList
Signals
- onBorderColorChanged(color color)
- onColorChanged(color color)
- onLabelChanged()
- onLabelColorChanged(color color)
- onValueChanged(int index)
- onValuesAdded(int index, int count)
- onValuesRemoved(int index, int count)
Detailed Description
BarSet represents one set of bars. Set of bars contains one data value for each category. First value of set is assumed to belong to first category, second to second category and so on. If set has fewer values than there are categories, then the missing values are assumed to be at the end of set. For missing values in middle of a set, numerical value of zero is used. Labels for zero value sets are not shown.
See also AbstractBarSeries, BarSeries, StackedBarSeries, and PercentBarSeries.
Property Documentation
Defines the font used by the bar set's label.
See the Qt documentation for more details of Font.
The values of the bar set. You can set either a list of reals or a list of points as values.
If you set a list of reals as values, the values directly define the bar set values.
If you set a list of points as values, the x-coordinate of the point specifies its zero-based index in the bar set. The size of the bar set is the highest x-coordinate value + 1. If a point is missing for any x-coordinate between zero and the highest value, it gets value zero.
For example the following sets have equal values:
myBarSet1.values = [5, 0, 1, 5]; myBarSet2.values = [Qt.point(0, 5), Qt.point(2, 1), Qt.point(3, 5)];
Signal Documentation
This signal is emitted when the line (pen) color of the set has changed to color.
This signal is emitted when the fill (brush) color of the set has changed to color.
This signal is emitted when the text (label) color of the set has changed to color.
This signal is emitted values the value in the set has been modified. Parameter index indicates the position of the modified value.
This signal is emitted when new values have been added to the set. Parameter index indicates the position of the first inserted value. Parameter count is the number of inserted values.
This signal is emitted values have been removed from the set. Parameter index indicates the position of the first removed value. Parameter count is the number of removed values.