plot icon indicating copy to clipboard operation
plot copied to clipboard

label on color swatches

Open Fil opened this issue 2 years ago • 1 comments

closes #834 supersedes #621

Fil avatar Sep 29 '23 15:09 Fil

When there is a label (which now defaults to the scale label), the swatches (color rect + color label) are now wrapped into their own div (.plot-swatch). We don't wrap if there is no label.

The div containing the swatches still gets the proper .plot-swatches-columns or .plot-swatches-swatches className depending on the columns option, the only change here is that it is decided a bit later in the code.

The CSS ensures that the label is close to the swatches (also is a bit simpler than what we had before), with the same vertical gap between them as with the ramp.

Here are two representative examples:

"bad" "ok"
quantile-bad quantile-ok
title-bad title-ok

I suppressed the automatic label on some of the charts, either when it didn't seem useful (because it would be obvious from reading the tick labels), or simply for aesthetic reasons.

Fil avatar Oct 12 '23 07:10 Fil