C

Qt Charts for MCUs QML Types

Overview

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 for details.

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

Getting started

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)

And add the following import statement to your .qml file:

import QtCharts 2.15

Use the 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 types

AbstractAxis

A base type used for specialized axis types

AbstractBarSeries

A base type for all bar series types

AbstractSeries

Base type for all Chart series types

BarCategoryAxis

Adds categories to a chart's axes

BarCategoryValue

Specifies a category value in a BarCategoryAxis

BarSeries

Presents a series of data as vertical bars grouped by category

BarSet

Represents one set of bars in a bar chart

BarSetValue

Specifies a value in a BarSet

ChartView

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

Margins

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

ValueAxis

Adds values to a chart's axes

Available under certain Qt licenses.
Find out more.