Bug 169691 - Better way of axis scaling in diagrams in LibreOffice Calc
Summary: Better way of axis scaling in diagrams in LibreOffice Calc
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.8.3.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval, needsUXEval
Depends on:
Blocks: Chart-Labels
  Show dependency treegraph
 
Reported: 2025-11-25 21:15 UTC by the.stig.tr
Modified: 2026-01-29 10:24 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description the.stig.tr 2025-11-25 21:15:22 UTC
Description:
When you want to chose the scaling of the x and y axis manually in a diagram using LibreOffice Calc you can only enter a number as minimum and maximum value. My idea would be adding the ability to use a minimum and maximum number that is in already entered a cell in the sheet similar to what you do when you add a new set of data.
F.e. instead of writing 171 as maximum number for the x axis directly you have a cell where the maximum number of 171 is standing so you would put in =$'Sheet1'.$A$4. That way you could change the scaling easier without having to go in the diagram and the axis scaling menu.
That feature would be useful since i'm working a lot with statistical distribution functions f(n) where n is the number of tries with 2 parameters being the number of successes k and the hitting probability p. That way it would automatically scale the x axis depending on k and p so that the maximum aka the expected value is centered on the x axis of the diagram.
Coding wise the interface should look similar to when you're editing a set of data.

Steps to Reproduce:
1. Have a diagram of a function in Libreoffice Calc and also have the minimum and maximum values of both x and y axis in cells in the same sheet
2. Make sure automatic scaling is turned off
3. Go in the axis scaling menu and try to enter the cell instead of the number under minumum or maximum value. F.e. instead of 171 you enter =$'Sheet1'.$A$4 since in 'Sheet1' cell A4 you entered 171

Actual Results:
After you type =$'Sheet1'.$A$4 and leave the field with the cursor it goes back to the number it had before since it can't work with that.

Expected Results:
It should read the number entered in 'Sheet1' cell A4 and use that as the scaling number. If there is not a number in the cell it should give out an error.


Reproducible: Always


User Profile Reset: No

Additional Info:
None
Comment 1 Olivier Hallot 2026-01-20 16:48:51 UTC
Valid.

Same concept as described in bug#103863, but for min/max of axis labels.

Possible solution: Select chart axis, then issue  Format selection - Scale. 

Add a shrink/expand button to pick the value or reference of the cell to feed the scale limits.
Comment 2 Heiko Tietze 2026-01-21 12:33:24 UTC
I would challenge the use case (frequently changing the axis range where Automatic is not working) and disagree with the proposed solution here and in bug 103863 to use a cell value for chart manipulation. At least by default, meaning a macro that picks a value and modifies the chart is very much welcome.

Keep in mind that we have to obey the file format and references to a data sheet in charts is not defined.
Comment 3 Lars Jødal 2026-01-22 06:02:12 UTC
A workaround to scale x and y axis through cell contents can be to use automatic scaling and add a series with "dummy" data to the plot that forces to automatic scaling to include these data. The "dummy" data series can be concealed in the plot by setting the series to no line, not point.

This workaround will only partially ensure the functionality, e.g., it can only make the range wide enough, it cannot reduce scaling. But it may be useful for setting a standard scale large enough.

(I do not see a way to make a similar workaround regarding axis titles, bug 103863. But I suggest we take discussion of that issue, including pros and cons of that enhancement request, under that report.)