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 ,打開 歡迎 模式,然後選擇範例從 範例 。更多信息,見 Qt Creator:教程:構建並運行 .

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

範例工程 @ code.qt.io