Color and shape are great tools to convey information, so we added a flexible way to do just that with tables!
Our tables now have the option to add labels to each entry point, these labels have multiple options to define its color and shape using a comprehensive dictionary as the parameter for the s.plt.table method.
Configurations
This is a flexible feature and it can be used in simple and complex ways, so we will explain it's capabilities separated by complexity.
Basic Configuration
To activate the labels you have to provide a dictionary as the parameter label columns, this dictionary has to define the color for each column that will have labels. The default colors that you can use are the following:
This colors represent abstract ideas and they can be customized for any business, they aren't linked to predefined colors.
It is highly recommended to always use the default colors
For each color that is defined you can choose the type of variant that you want to see, the options are filled and outlined.
As it has been shown before the default configuration is filled. You can define the desired variant configuration by passing a tuple as the key of the label definition:
Even if we recommend using the default colors there are situations in which a specific color is needed. We have three ways to define specific colors, by name of a common color, by hexadecimal notation of RGB or by list of values of RGB.
The common color list that can be used is:
The other two definitions use the RGB standards, one uses the hexadecimal representation:
Sometimes you will need to have different colors and shapes for values in the same column, so we added two ways to handle this situation, color definition per value, or, in case of numeric values, per range of values. To define multiple colors per column you will have to use a dictionary instead of a color or variant, this dictionary will tell which values of the column will have which color.