- Qt 6.8
- Qt Charts
- Qt Charts Examples
- Charts with Widgets Gallery
- Qt Charts | Commercial or GPLv3

# 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.
Creating Area Charts | Shows how to create a simple area chart.
Creating Bar Charts | BarChart shows the data in sets as separate bars within categories.
Creating Box-and-Whiskers Charts | Shows how to create a box-and-whiskers chart.
Creating Candlestick Charts | Shows how to create a candlestick chart.
Creating Charts With Themes | Shows the look and feel of the different built-in themes.
Creating Horizontal Bar Charts | Shows how to create a horizontal bar chart.
Creating Horizontal Percent Bar Charts | Shows how to create a simple horizontal percent bar chart.
Creating Horizontal Stacked Bar Charts | Shows how to create a simple stacked horizontal bar chart.
Creating Line Charts | Shows how to create a simple line chart.
Creating Nested Donut Charts | Shows how to create a nested donut chart using the QPieSeries API.
Creating Percent Bar Charts | Shows how to create a simple percent bar chart.
Creating Polar Charts | Shows how to create a simple polar chart with multiple different series.
Creating Scatter Charts | The example shows how to create a simple scatter chart.
Creating Stacked Bar Charts | Shows how to create a simple stacked bar chart.
Creating a Donut Breakdown Chart | Shows how to create a donut breakdown chart.
Customizing Charts | Shows how to customize the appearance of chart elements.
Detaching and Attaching Legends | 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.
Using Data Models with Bar Charts | Shows how to use QAbstractItemModel derived model as the data for a bar series.
Using Legend Markers | 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.
Using Logarithmic Value Axes | Shows how to use QLogValueAxis.
Using Model Data | Shows how to use the QAbstractItemModel derived model as series data.
Using Multiple Axes | Shows how to create a chart with a vertical axis for each series.

#### Running the Example

To run the example from Qt Creator, open the Welcome mode and select the example from Examples. For more information, see Qt Creator: Tutorial: Build and run.

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

Example project @ code.qt.io