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

Customizing the marks and values of sliders

The simplest way to create these is by using a dictionary: {0: '$1.9', 1: '$3.2', 2: '$5.5'}. They keys will be used as the value attribute, and the values of the dictionary are what the user will see for each poverty level. This will suffice for our case, and we can use it as such.

We optionally have the chance to customize the style of our labels, which can take any CSS attribute as a dictionary. If you look at Figure 6.21, you can see that the marks (numbers) of the two sliders have a very light color, and they might give the impression that they belong to the same slider. We can improve this by setting their colors to a dark color. We can also set a bold font for the indicator slider. This will help distinguish them from the years, and it will also emphasize their uniqueness. Years are easy to immediately grasp, but users are most likely not familiar with the levels of poverty tracked in the dataset....

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