AreaSeries QML Type

The AreaSeries type is used for making area charts. More...

Import Statement: import QtCharts 2.1
Instantiates: QAreaSeries
Inherits:

AbstractSeries

Properties

Signals

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

borderColor : color

Line (pen) color of the series.


borderWidth : real

The width of the border line. By default the width is 2.0.


brushFilename : QString

The name of the file used as a brush image for the series.


color : color

Fill (brush) color of the series.


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.


pointLabelsClipping : bool

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.


pointLabelsColor : font

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.


pointLabelsFont : font

Defines the font used for data point labels.

See also pointLabelsFormat.


pointLabelsFormat : string

The format used for showing labels with series points.

See also QAreaSeries::pointLabelsFormat, pointLabelsVisible, pointLabelsFont, and pointLabelsColor.


pointLabelsVisible : bool

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

onBorderColorChanged(color color)

Signal is emitted when the line (pen) color has changed to color.


onClicked(QPointF point)

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.


onColorChanged(color color)

Signal is emitted when the fill (brush) color has changed to color.


onDoubleClicked(QPointF point)

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.


onHovered(point point, bool state)

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.


onPointLabelsClippingChanged(bool clipping)

The clipping of the data point labels is changed to clipping.


onPointLabelsColorChanged(Color color)

The color used for data point labels is changed to color.


onPointLabelsFontChanged(Font font)

The font used for data point labels is changed to font.


onPointLabelsFormatChanged(string format)

Signal is emitted when the format of data point labels is changed.


onPointLabelsVisibilityChanged(bool visible)

The visibility of the data point labels is changed to visible.


onPressed(QPointF point)

Signal is emitted when user presses the point on area chart.

See also onClicked, onReleased, and onDoubleClicked.


onReleased(QPointF point)

Signal is emitted when user releases a press that was triggered on a point on area chart.

See also onPressed, onClicked, and onDoubleClicked.


onSelected()

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.