Problems with data labels in charts

Regina Henschel rb.henschel at t-online.de
Sat Aug 22 22:11:23 UTC 2020


Hi Miklos, hi all,

Miklos Vajna schrieb am 18-Aug-20 um 09:19:
> Hi Regina,
> 
> On Mon, Aug 17, 2020 at 08:19:37PM +0200, Regina Henschel <rb.henschel at t-online.de> wrote:
>> So you suggest to keep the internal structure?
>>
>> That would mean, we will get about 18 additional "LabelFoo" properties over
>> the time for the still missing fill and line properties.
> 
> That is indeed some cost to be considered.
> 
>> Then these needs to be done:
>> A) Implement import of such ODF files, which use the styles of
>> <chart:data-label> elements for the fill and line properties of labels, so
>> that this information goes into the internal "labelFoo" properties.
>> B) Implement export to ODF, so that it writes the "labelFoo" properties into
>> the styles of <chart:data-label> elements, initially in addition to the
>> loext:labelFoo attributes.
>> C) Implement a service for the "labelFoo" properties. (Currently they are
>> not officially available in the API, although they are visible in the Basic
>> IDE.)
>>
>> The problem was not introduced by Gülşah, but this structure was determined
>> by Kohei Yoshida July 2014 with commit https://cgit.freedesktop.org/libreoffice/core/commit/?id=f1531cdaaebe706d909dc6ddde439ccb5f4ad36d
> 
> Ah, thanks for researching that, so it's older.
> 
> Given it's there since 2014, I think there is benefit in not breaking
> that. I would rather add the remaining missing LabelFoo properties
> and keep the existing API working than the other way around.

I have now started with A). It is in 
https://gerrit.libreoffice.org/c/core/+/101194. That makes it easier to 
speak about the problems.

The current state is, that the styles, which are referenced by a 
<chart:data-label> element are read and that the attributes svg:x and 
svg:y for the absolute position are read.

My ides is, to change the property names of the fill and line properties 
from their usual shape names to the "LabelFoo" names and then interpret 
the style as series or data point style respectively. Such changing is 
missing yet. Before I continue, I want to ask, what do you think about 
the idea?

Or do you have a better idea?


Not addressed is the position problem. Neither series nor data points 
have a property to hold an absolute position. And converting to the 
relative positions of Custom Position is only possible, if the data 
label position according the LabelPlacement values is known. But that is 
unknown, when styles are applied in 
SchXMLSeries2Context::setStylesToSeries or 
SchXMLSeries2Context::setStylesToDataPoints

Custom Position was introduced by Balazs Varga with commits
4223ff2be69f03e571464b0b09ad0d278918631b and
2a00d51150d410110602c953b3c3895debfcaa98.

If you have an idea for that, please tell me.

Kind regards
Regina








More information about the LibreOffice mailing list