Qt Charts for MCUs QML 类型


The Qt Charts for MCUs module provides a set of easy to use charts components for Qt Quick Ultralite.

Qt Charts for MCUs aims to be compatible with Qt Charts. See Qt Charts Compatibility 了解细节。

注意: This module is a technology preview. Many features from Qt Charts are not yet available and there is no source-compatibility guarantee between versions.


To use the Qt Charts for MCUs QML types, link your application to the Qul::QuickUltraliteCharts CMake target:

target_link_libraries(app Qul::QuickUltralite Qul::QuickUltraliteCharts Qul::QuickUltralitePlatform)

And add the following import statement to your .qml 文件:

import QtCharts 2.15

使用 ChartView QML type along with one of the series types, like BarSeries , to create a chart:

ChartView {
    title: "Test Chart"
    margins { left: 80; right: 50; bottom: 50; top: 50 }
    BarSeries {
        axisX: BarCategoryAxis {
            BarCategoryValue { value: "2016" }
            BarCategoryValue { value: "2017" }
            BarCategoryValue { value: "2018" }
        BarSet {
            BarSetValue { value: 3 }
            BarSetValue { value: 5 }
            BarSetValue { value: 2 }
        BarSet {
            BarSetValue { value: 1 }
            BarSetValue { value: 4 }
            BarSetValue { value: 3 }

Bar Chart Example

QML 类型


A base type used for specialized axis types


A base type for all bar series types


Base type for all Chart series types


Adds categories to a chart's axes


Specifies a category value in a BarCategoryAxis


Presents a series of data as vertical bars grouped by category


Represents one set of bars in a bar chart


Specifies a value in a BarSet


Manages the graphical representation of the chart's series, legends, and axes


Defines margins between the edge of the chart rectangle and the plot area


Adds values to a chart's axes