Qt Charts C++ Classes

C++ classes for the Qt Charts API. More...

Classes

QAreaSeries

Presents data in area charts

QBarCategoryAxis

Adds categories to a chart's axes

QCategoryAxis

Places named ranges on the axis

QDateTimeAxis

Adds dates and times to a chart's axis

QLogValueAxis

Adds a logarithmic scale to a chart's axis

QAbstractAxis

Base class used for specialized axis classes

QValueAxis

Adds values to a chart's axes

QHorizontalBarSeries

Presents a series of data as horizontal bars grouped by category

QHorizontalPercentBarSeries

Presents a series of categorized data as a percentage of each category

QHorizontalStackedBarSeries

Presents a series of data as horizontally stacked bars, with one bar per category

QAbstractBarSeries

Abstract parent class for all bar series classes

QBarSet

Represents one set of bars in a bar chart

QHBarModelMapper

Horizontal model mapper for bar series

QVBarModelMapper

Vertical model mapper for bar series

QBarSeries

Presents a series of data as vertical bars grouped by category

QPercentBarSeries

Presents a series of categorized data as a percentage of each category

QStackedBarSeries

Presents a series of data as vertically stacked bars, with one bar per category

QBoxPlotSeries

Presents data in box-and-whiskers charts

QBoxSet

Represents one item in a box-and-whiskers chart

QHBoxPlotModelMapper

Horizontal model mapper for box plot series

QVBoxPlotModelMapper

Vertical model mapper for box plot series

QCandlestickModelMapper

Abstract model mapper class for candlestick series

QCandlestickSeries

Presents data as candlesticks

QCandlestickSet

Represents a single candlestick item in a candlestick chart

QHCandlestickModelMapper

Horizontal model mapper for a candlestick series

QVCandlestickModelMapper

Vertical model mapper for a candlestick series

QAreaLegendMarker

Legend marker for an area series

QBarLegendMarker

Legend marker for a bar series

QBoxPlotLegendMarker

Legend marker for a box plot series

QCandlestickLegendMarker

Legend marker for a candlestick series

QLegend

Displays the legend of a chart

QLegendMarker

Abstract object that can be used to access markers within a legend

QPieLegendMarker

Legend marker for a pie series

QXYLegendMarker

Legend marker for a line, spline, or scatter series

QLineSeries

Presents data in line charts

QHPieModelMapper

Horizontal model mapper for pie series

QPieSeries

Pie series API for Qt Charts

QPieSlice

Defines a slice in pie series

QVPieModelMapper

Vertical model mapper for pie series

QAbstractSeries

Base class for all Qt Chart series

QChart

Main chart API for Qt Charts

QChartView

Standalone charting widget

QPolarChart

Polar chart API for Qt Charts

QScatterSeries

Used for making scatter charts

QSplineSeries

Series type used to store data needed to draw a spline

QHXYModelMapper

Horizontal model mapper for QXYSeries

QVXYModelMapper

Vertical model mapper for QXYSeries

QXYSeries

Base class for line, spline and scatter series

Detailed Description

Charts API is built on top of Qt Graphics View Framework. Charts can be displayed as QGraphicsWidget using the QChart class. However there is also the convenience class QChartView, which is QWidget based. These enable us to quickly use Qt Charts as a normal Qt widget.

Each chart type is represented by the QAbstractSeries derived class. To create charts, the users have to use an instance of the related series class and add it to a QChart instance.

QLineSeries* series = new QLineSeries();
series->add(0, 6);
series->add(2, 4);
...
chartView->chart()->addSeries(series);
chartView->chart()->createDefaultAxes();

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.