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
A base type used for specialized axis types | |
An abstract parent type for all bar series types | |
Base type for all Qt Chart series types | |
Presents data in area charts | |
Adds categories to a chart's axes | |
Presents a series of data as vertical bars grouped by category | |
Represents one set of bars in a bar chart | |
Presents data in box-and-whiskers charts | |
Represents one item in a box-and-whiskers chart | |
Represents a series of data as candlesticks | |
Represents a single candlestick item in a candlestick chart | |
Places named ranges on the axis | |
Defines a range on a category axis | |
Manages the graphical representation of the chart's series, legends, and axes | |
Adds dates and times to a chart's axis | |
Horizontal model mapper for bar series | |
Horizontal model mapper for box plot series | |
Horizontal model mapper for a candlestick series | |
Horizontal model mapper for pie series | |
A horizontal model mapper for XYSeries | |
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 stacked horizontal bars, with one bar per category | |
Displays the legend of a chart | |
Presents data in line charts | |
Adds a logarithmic scale to a chart's axis | |
Defines margins between the edge of the chart rectangle and the plot area | |
Presents a series of categorized data as a percentage of each category | |
Presents data in pie charts | |
Represents a single slice in a pie series | |
Presents data in polar charts | |
Type presents data in scatter charts | |
Presents data as spline charts | |
Presents a series of data as vertically stacked bars, with one bar per category | |
Vertical model mapper for bar series | |
Vertical model mapper for box plot series | |
Vertical model mapper for a candlestick series | |
Vertical model mapper for pie series | |
A vertical model mapper for XYSeries | |
Adds values to a chart's axes | |
Initializes XY-series coordinate data | |
A base type for line, spline, and scatter series |
© 2020 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.