Logarithm on base other than 10 for chart axes
Leyan Ouyang
ouyang.leyan.dev at gmail.com
Sun Feb 6 13:39:13 UTC 2022
I have been looking at what would be needed to support charts using a
logarithm axis with a base different from 10.
It is already supported by the LogarithmicScaling object and using the
API it is already possible to generate a chart with a log axis in a
different base, so it is only lacking the configuration UI and
read/write files. I have two questions about it:
1. It seems there is currently no explicit support in ODF, but it is
coming in ODF 1.4: I saw a discussion regarding this in
https://issues.oasis-open.org/browse/OFFICE-3936, but I am not sure
about the expected behavior and the key part has been converted to a
smiley. Is the idea to write "log(2)" or "0.30102999566398114" for
the interval-major attribute? The second is what is already possible
and done today (see for example
https://askubuntu.com/questions/1105001/libreoffice-x-axis-log2),
but if we want a nicer UI and offer to configure "2" or "10" or
whatever, does it mean we need to check if the interval-major value
looks like the log of an integer?
2. Regarding Office Open XML, it is supported and LibreOffice does
retrieve a value mofLogBase in oox, but I did not find how to create
a LogarithmicScaling with an argument to provide the base (or modify
it once created). The object is created today with
"LogarithmicScaling::create(
comphelper::getProcessComponentContext() );", how can I pass an
argument on top of it?
Regards,
Leyan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20220206/652286ed/attachment.htm>
More information about the LibreOffice
mailing list