Bug 163807 - Automatic color of labels must ensure reasonable contrast in area of placement
Summary: Automatic color of labels must ensure reasonable contrast in area of placement
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
7.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Automatic-Color Pie-and-Donut
  Show dependency treegraph
 
Reported: 2024-11-07 21:02 UTC by Eyal Rozenberg
Modified: 2024-11-08 08:08 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Spreadsheet with a pie chart in a variety of slice colors (21.59 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-11-07 21:02 UTC, Eyal Rozenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2024-11-07 21:02:32 UTC
Created attachment 197483 [details]
Spreadsheet with a pie chart in a variety of slice colors

If we take a chart with areas in different colors, and add data labels, they will typically be located on the colored areas of the chart (e.g. slices of a pie); and - their color will be black. Technically, the color is "automatic", but effectively, it's always (?) black.

As an example:

1. Open the attached document
2. Double-click the pie chart to enter it
3. On the menu, choose Insert > Data Labels...
4. Toggle "Value as Number"

Expected results:
Labels are set so as to be visible with reasonable contrast in all pie slices (e.g. using different colors, or some auto-enabled effect such as a different-color vignette, or shadow, or glow, or outline).

Actual results:
Labels are all set in black color, for both light and very-dark backgrounds. This is true specifically for the black-colored pie slice, where the label is completely invisible.
Comment 1 Eyal Rozenberg 2024-11-07 21:05:56 UTC
Phrased differently, the automatic color of data labels should consider not just the labels as objects but other objects underneath them.
Comment 2 Heiko Tietze 2024-11-08 07:47:15 UTC
Yes, the data label should consider the actual background for automatic light/dark.
Comment 3 Eyal Rozenberg 2024-11-08 08:08:55 UTC
(In reply to Heiko Tietze from comment #2)
> Yes, the data label should consider the actual background for automatic
> light/dark.

So, that would be an improvement in terms of readability. But we do need to consider that occasional white rather than black labels is a bit of an eyesore. Ideally, I would prefer a way in which the labels would all look the same, _and_ have contrast. So, something like a surrounding effect would have been better. And still, as long as they have automatic color - it needs to consider the backgroud.