Horizontal Percentage Bar Graph (PyQt5)

The horizontal percent bar chart shows the data in a set as a percentage of all sets per category.

Creating a horizontal percent bar chart is just like creating a regular bar chart, except that for a horizontal percent bar chart, we use the QHorizontalPercentBarSeries class instead of QBarSeries.

In this tutorial we will learn how to create a horizontal percentage bar graph using the PyQt5 library in Python.

Qt Charts (PyQt5, PyQt, Qt) module provides a set of easy to use chart components. It uses the Qt Graphics View Framework, therefore charts can be easily integrated to modern user interfaces. Qt Charts can be used as QWidgets, QGraphicsWidget, or QML types. Users can easily create impressive graphs by selecting one of the charts themes.

Python Code Snippet