Qt Charts QML Types
The Qt Charts QML API is an intuitive and simple way to show charts in your QML applications.
Use the following QML to create a simple pie chart:
import QtQuick 2.0 import QtCharts 2.0 ChartView { width: 400 height: 300 theme: ChartView.ChartThemeBrownSand antialiasing: true PieSeries { id: pieSeries PieSlice { label: "eaten"; value: 94.9 } PieSlice { label: "not yet eaten"; value: 5.1 } } }
Note: Since Qt Creator 3.0 the project created with Qt Quick Application wizard based on Qt Quick 2 template uses QGuiApplication by default. As Qt Charts utilizes Qt Graphics View Framework for drawing, QApplication must be used. The project created with the wizard is usable with Qt Charts after the QGuiApplication is replaced with QApplication.
QML Types
Base element used for specialized axis elements | |
Series type for creating a bar chart | |
Base class for all Qt Chart series | |
Type is used for making area charts | |
Axis element is used for manipulating chart's axes | |
Series for creating bar chart | |
Building block for different bar charts | |
Series for creating box-and-whiskers chart | |
Building block for box-and-whiskers chart | |
Allows putting a named ranges on the axis | |
With CategoryRange you can define a range used by a CategoryAxis | |
Chart element | |
Element is used for manipulating chart's axes | |
Horizontal model mapper for bar series | |
Horizontal model mapper for pie series | |
Horizontal model mapper for QXYSeries | |
Series type for creating horizontal bar chart | |
Series type for creating horizontal precent bar chart | |
Series type for creating horizontal stacked bar chart | |
Part of Qt Chart QML API | |
Type is used for making line charts | |
Element is used for manipulating chart's axes | |
Type is used to define margins | |
Series for creating persent bar chart | |
Type is used for making pie charts | |
Defines a slice in pie series | |
Polar chart element | |
Type is used for making scatter charts | |
Type is used for making spline charts | |
Series for creating stacked bar chart | |
Vertical model mapper for bar series | |
Vertical model mapper for box plot series | |
Vertical model mapper for pie series | |
Vertical model mapper for QXYSeries | |
Element is used for manipulating chart's axes | |
Type is used to initialize XY-series coordinate data | |
Type is a base type for line, spline and scatter series |