Charts with Widgets Gallery

An application that demonstrates the Qt Charts Widgets API.

This example demonstrates the Qt Charts API for widgets by using included sample data to populate a number of chart types and interactions for a user.

Changing the Color and State of Bars

Shows how to use a selection feature for the bar chart.

Combining Line and BarChart

Shows how to combine different charts and set the axes.

创建区域图表

Shows how to create a simple area chart.

创建条形图表

BarChart shows the data in sets as separate bars within categories.

创建方框和晶须图表

Shows how to create a box-and-whiskers chart.

创建烛台图表

展示如何创建烛台图表。

Creating Charts With Themes

Shows the look and feel of the different built-in themes.

创建水平条形图表

Shows how to create a horizontal bar chart.

创建水平百分比条形图表

Shows how to create a simple horizontal percent bar chart.

创建水平堆叠条形图表

Shows how to create a simple stacked horizontal bar chart.

创建线图表

Shows how to create a simple line chart.

创建嵌套圆环图表

Shows how to create a nested donut chart using the QPieSeries API.

创建百分比条形图表

Shows how to create a simple percent bar chart.

创建极坐标图表

Shows how to create a simple polar chart with multiple different series.

创建散点图表

The example shows how to create a simple scatter chart.

创建堆叠条形图表

Shows how to create a simple stacked bar chart.

Creating a Donut Breakdown Chart

Shows how to create a donut breakdown chart.

定制图表

Shows how to customize the appearance of chart elements.

分离和附加图例

Shows how to detach the legend from the chart and attach it back.

Displaying Temperature Records with Negative Bars

Shows how to create a bar chart with negative bars.

Drawing a Callout on Top of a Chart

Shows how to draw an additional element (a callout) on top of a chart.

Implementing Drilldown

Shows how to implement drilldown using a stacked barchart.

Line Charts with Date and Time Axes

Shows how to use QLineChart with QDateTimeAxis.

Selected Point Configuration

Shows how to modify the configuration of individual points.

使用带条形图表的数据模型

Shows how to use QAbstractItemModel derived model as the data for a bar series.

使用图例标记

Shows how to make use of legend markers.

Using Light Markers and Points Selection

Shows how to use light markers and points selection for a series.

使用对数值轴

Shows how to use QLogValueAxis.

使用模型数据

Shows how to use the QAbstractItemModel derived model as series data.

使用多轴

Shows how to create a chart with a vertical axis for each series.

运行范例

要运行范例从 Qt Creator ,打开 Welcome 模式,然后选择范例从 Examples 。更多信息,拜访 构建和运行范例 .

If you want to implement charts with QML see the Charts with QML Gallery .

范例工程 @ code.qt.io