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
Type is used for making area charts | |
Axis element is used for manipulating chart's axes | |
Allows putting a named ranges on the axis | |
Element is used for manipulating chart's axes | |
Element is used for manipulating chart's axes | |
Base element used for specialized axis elements | |
Element is used for manipulating chart's axes | |
Series type for creating horizontal bar chart | |
Series type for creating horizontal precent bar chart | |
Series type for creating horizontal stacked bar chart | |
Series type for creating a bar chart | |
Building block for different bar charts | |
Horizontal model mapper for bar series | |
Vertical model mapper for bar series | |
Series for creating bar chart | |
Series for creating persent bar chart | |
Series for creating stacked bar chart | |
Vertical model mapper for box plot series | |
Part of Qt Chart QML API | |
Type is used for making line charts | |
Horizontal model mapper for pie series | |
Type is used for making pie charts | |
Defines a slice in pie series | |
Vertical model mapper for pie series | |
Base class for all Qt Chart series | |
Type is used for making scatter charts | |
Type is used for making spline charts | |
Horizontal model mapper for QXYSeries | |
Vertical model mapper for QXYSeries | |
Type is a base type for line, spline and scatter series | |
Series for creating box-and-whiskers chart | |
Building block for box-and-whiskers chart | |
With CategoryRange you can define a range used by a CategoryAxis | |
Chart element | |
Type is used to define margins | |
Polar chart element | |
Type is used to initialize XY-series coordinate data |