C++ classes for the Qt Charts API. More...
Adds categories to a chart's axes |
|
Places named ranges on the axis |
|
Adds dates and times to a chart's axis |
|
Adds a logarithmic scale to a chart's axis |
|
Base class used for specialized axis classes |
|
Presents a series of data as horizontal bars grouped by category |
|
Presents a series of categorized data as a percentage of each category |
|
Presents a series of data as horizontally stacked bars, with one bar per category |
|
Abstract parent class for all bar series classes |
|
Presents a series of data as vertical bars grouped by category |
|
Presents a series of categorized data as a percentage of each category |
|
Presents a series of data as vertically stacked bars, with one bar per category |
|
Abstract model mapper class for candlestick series |
|
Represents a single candlestick item in a candlestick chart |
|
Presents data in line charts |
|
Manages the graphical representation of the chart's series, legends, and axes |
|
Standalone widget that can display charts |
|
Presents data in scatter charts |
|
Presents data as spline charts |
|
Presents data in area charts |
|
Adds values to a chart's axes |
|
Represents one set of bars in a bar chart |
|
Horizontal model mapper for bar series |
|
Vertical model mapper for bar series |
|
Presents data in box-and-whiskers charts |
|
Represents one item in a box-and-whiskers chart |
|
Horizontal model mapper for box plot series |
|
Vertical model mapper for box plot series |
|
Presents data as candlesticks |
|
Horizontal model mapper for a candlestick series |
|
Vertical model mapper for a candlestick series |
|
Legend marker for an area series |
|
Legend marker for a bar series |
|
Legend marker for a box plot series |
|
Legend marker for a candlestick series |
|
Displays the legend of a chart |
|
Abstract object that can be used to access markers within a legend |
|
Legend marker for a pie series |
|
Legend marker for a line, spline, or scatter series |
|
Horizontal model mapper for pie series |
|
Presents data in pie charts |
|
Represents a single slice in a pie series |
|
Vertical model mapper for pie series |
|
Base class for all Qt Chart series |
|
Presents data in polar charts |
|
Horizontal model mapper for line, spline, and scatter series |
|
Vertical model mapper for line, spline, and scatter series |
|
Base class for line, spline, and scatter series |
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.
If you intend to use Qt Charts C++ classes in your application, use the following include and using directives:
#include <QtCharts> using namespace QtCharts;
Note: Projects created with Qt Creator's Qt Quick Application wizard are based on the Qt Quick 2 template that uses QGuiApplication by default. All such QGuiApplication instances in the project must be replaced with QApplication as the module depends on Qt's Graphics View Framework for rendering.
To link against the Qt Charts module, add this line to your qmake
project file:
QT += charts
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->append(0, 6); series->append(2, 4); ... chartView->chart()->addSeries(series); chartView->chart()->createDefaultAxes();