The value-based legend is used to visually represent value ranges through color shades. It is currently available for the heatmap.
Value-based legend example on a heatmap
Layout and Responsiveness
The value-based legend is positioned by default at the right of the data plot. If the space is too small (for example, in portrait mode on a smartphone), it moves to the bottom. In this case, it is displayed in a condensed format.
Responsiveness on a smartphone - Portrait mode
Behavior
The default value-based legend comprises five segments and uses the first hue of the sequential color palette.
Default value-based legend
Sequential palette
Customization
Number of Segments
You can change the number of segments from two to nine. The corresponding value ranges are automatically calculated and assigned to each shade. However, you need to assign the colors to the segments yourself.
Recommended Colors for the Sequential Palette
Recommended sequential value-based legend from two to nine items
Example of a heatmap with an 5-segment sequential value-based legend
When you use the sequential color palette, you can also change the recommended hue illustrated above (still based on the SAP Fiori chart color palette). If you do so, follow this example for the choice of shades.
Recommended Colors for the Semantic Palette
Recommended semantic value-based legend from two to nine items
Example of a heatmap with an 5-segment semantic value-based legend
style
column-section-1-1, no-footprint
style
column-section-1-1, no-footprint
Range
Finally, you can manually set the range for each segment. Note that for a given segment number, “segment number + 1” values are needed (example: [0,8,9,10,11,20] for five segments).
If the overall range being defined is different from the real data range, the “>” and “<” signs are displayed on the legend.
Example 1: If all data is between 0 and 20. Example 2: If there is data larger than 20 and smaller than 0.
Resources
Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.