Reader small image

You're reading from  Interactive Dashboards and Data Apps with Plotly and Dash

Product typeBook
Published inMay 2021
Reading LevelBeginner
PublisherPackt
ISBN-139781800568914
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Elias Dabbas
Elias Dabbas
author image
Elias Dabbas

Elias Dabbas is an online marketing and data science practitioner. He produces open-source software for building dashboards, data apps, as well as software for online marketing, with a focus on SEO, SEM, crawling, and text analysis.
Read more about Elias Dabbas

Right arrow

Exploring different ways of displaying multiple bar charts (stacked, grouped, overlaid, and relative)

When we want to display values for different countries but for the same years, we have several options for how to display multiple bars on each position of the x axis. Figure 5.9 shows the different ways in which we can do that when visualizing two variables, a and b:

Figure 5.9 – Multiple bar charts displayed using different "barmode" options

Figure 5.9 – Multiple bar charts displayed using different "barmode" options

The four bar charts in the preceding diagram show the same information, but in different ways. This can be set using the barmode parameter. With relative, bars are displayed on top of one another, with negative values below, and positive values above, the zero line. If you set it to group, then bars will be displayed next to one another. With overlay, bars are displayed in front of one another, and by default, we get some transparency in order to see both bars. Finally, if you set it to stack, you...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Interactive Dashboards and Data Apps with Plotly and Dash
Published in: May 2021Publisher: PacktISBN-13: 9781800568914

Author (1)

author image
Elias Dabbas

Elias Dabbas is an online marketing and data science practitioner. He produces open-source software for building dashboards, data apps, as well as software for online marketing, with a focus on SEO, SEM, crawling, and text analysis.
Read more about Elias Dabbas