AreaSeries QML Type
The AreaSeries type is used for making area charts. More...
Import Statement: | import QtCharts 2.1 |
Instantiates: | QAreaSeries |
Inherits: |
Properties
- borderColor : color
- borderWidth : real
- brushFilename : QString
- color : color
- lowerSeries : LineSeries
- pointLabelsClipping : bool
- pointLabelsColor : font
- pointLabelsFont : font
- pointLabelsFormat : string
- pointLabelsVisible : bool
- upperSeries : LineSeries
Signals
- onBorderColorChanged(color color)
- onClicked(QPointF point)
- onColorChanged(color color)
- onDoubleClicked(QPointF point)
- onHovered(point point, bool state)
- onPointLabelsClippingChanged(bool clipping)
- onPointLabelsColorChanged(Color color)
- onPointLabelsFontChanged(Font font)
- onPointLabelsFormatChanged(string format)
- onPointLabelsVisibilityChanged(bool visible)
- onPressed(QPointF point)
- onReleased(QPointF point)
- onSelected()
Detailed Description
The following QML shows how to create a simple area chart:
ChartView { title: "NHL All-Star Team Players" anchors.fill: parent antialiasing: true ValueAxis { id: valueAxis min: 2000 max: 2011 tickCount: 12 labelFormat: "%.0f" } AreaSeries { name: "Russian" color: "#FFD52B1E" borderColor: "#FF0039A5" borderWidth: 3 axisX: valueAxis upperSeries: LineSeries { XYPoint { x: 2000; y: 1 } XYPoint { x: 2001; y: 1 } XYPoint { x: 2002; y: 1 } XYPoint { x: 2003; y: 1 } XYPoint { x: 2004; y: 1 } XYPoint { x: 2005; y: 0 } XYPoint { x: 2006; y: 1 } XYPoint { x: 2007; y: 1 } XYPoint { x: 2008; y: 4 } XYPoint { x: 2009; y: 3 } XYPoint { x: 2010; y: 2 } XYPoint { x: 2011; y: 1 } } }
Note: Adding the same line series to chart and area series is not supported. The series used as boundary lines should be defined only for the area series.
Property Documentation
lowerSeries : LineSeries |
The lower one of the two line series used to define are series boundaries. Note if AreaSeries was constructed without a lowerSeries this is null.
Defines the clipping for data point labels. True by default. The labels on the edge of the plot area are cut when clipping is enabled.
See also pointLabelsVisible.
Defines the color used for data point labels. By default, the color is the color of the brush defined in theme for labels.
See also pointLabelsFormat.
Defines the font used for data point labels.
See also pointLabelsFormat.
The format used for showing labels with series points.
See also QAreaSeries::pointLabelsFormat, pointLabelsVisible, pointLabelsFont, and pointLabelsColor.
Defines the visibility for data point labels.
See also pointLabelsFormat and pointLabelsClipping.
upperSeries : LineSeries |
The upper one of the two line series used to define area series boundaries.
Signal Documentation
Signal is emitted when user clicks the point on area chart. The point is the point where the press was triggered.
See also onPressed, onReleased, and onDoubleClicked.
Signal is emitted when user doubleclicks the point on area chart. The point is the point where the first press was triggered.
See also onPressed, onReleased, and onClicked.
This signal is emitted when user has hovered over or away from the series. point shows the origin (coordinate) of the hover event. state is true when user has hovered over the series and false when hover has moved away from the series.
The clipping of the data point labels is changed to clipping.
Signal is emitted when the format of data point labels is changed.
The visibility of the data point labels is changed to visible.
Signal is emitted when user presses the point on area chart.
See also onClicked, onReleased, and onDoubleClicked.
Signal is emitted when user releases a press that was triggered on a point on area chart.
See also onPressed, onClicked, and onDoubleClicked.
The signal is emitted if the user selects/deselects the XY series. The logic for maintaining selections should be implemented by the user of AreaSeries API.