Bug 147232 - Improvement of CALC diagrams
Summary: Improvement of CALC diagrams
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.5.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart
  Show dependency treegraph
 
Reported: 2022-02-06 13:42 UTC by shoe200
Modified: 2023-04-13 07:32 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
exemple for XY-diagram to be exported 1:1 scale (64.49 KB, image/png)
2022-02-06 13:43 UTC, shoe200
Details
Sample file. (14.79 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-02-06 20:47 UTC, LeroyG
Details
1_unequal axis scale (14.28 KB, image/png)
2023-03-28 17:04 UTC, shoe200
Details
2_equal axis scale --> this is the option I wish (16.05 KB, image/png)
2023-03-28 17:06 UTC, shoe200
Details
3_final result: this is the result of my work, scale = exactly 1:1 (279.56 KB, application/pdf)
2023-03-28 17:08 UTC, shoe200
Details
Workflow to achieve square diagrams (2.63 MB, image/gif)
2023-03-29 08:35 UTC, Heiko Tietze
Details
New panel for "true size" X/Y diagram image export (79.25 KB, image/png)
2023-03-30 20:05 UTC, shoe200
Details
CALC screenshot to demonstrate the dimensions. (318.57 KB, image/png)
2023-03-31 14:49 UTC, shoe200
Details
xy-chart with min/max and suitable chart wall size (26.22 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-03-31 14:59 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description shoe200 2022-02-06 13:42:01 UTC
Description:
I hope this is the right way to propose an improvement.

When usind XY-diagrams there are use cases that require the same scale in both axes. I generate patterns for sewing with an XY diagram, then export the diagram to *.SVG and do the scaling manually in DRAW, finally I create PDF for plotters. It would be nice to have an option like "Scale X and Y axis identically" in XY diagram export.
Nice to have: "Scale 1:.....". That means if the diagrams values are in "cm" unit and I enter "1:1" the export file would have the correct size in cm.
That would be really a great feature!


Steps to Reproduce:
1. create any XY-diagram
2. find a way to export the diagram as SVG with the same scale of X-axis and y-axis
3.

Actual Results:
XY-diagrams have different scale in X and Y after export

Expected Results:
identical scale in X and Y after SVG export of XY-diagrams


Reproducible: Always


User Profile Reset: No



Additional Info:
see above
Comment 1 shoe200 2022-02-06 13:43:11 UTC
Created attachment 178099 [details]
exemple for XY-diagram to be exported 1:1 scale
Comment 2 LeroyG 2022-02-06 20:47:36 UTC
Created attachment 178101 [details]
Sample file.

As a workaround, you can set the size of the wall to match your needs.
Comment 3 eisa01 2023-03-17 18:12:22 UTC
This sounds like a feature request, not limited to macOS

UX team, can you comment?
Comment 4 Heiko Tietze 2023-03-20 09:09:02 UTC
(In reply to shoe200 from comment #0)
> there are use cases that require the same scale in both axes.
I struggle with this statement.

> Expected Results:
> identical scale in X and Y after SVG export of XY-diagrams

Isn't this about the object dimension (right click the diagram when not in edit mode and chose Position and Size) plus the existing capability to change the scaling of axes?

In other words, please add an image of what you expect how the example in comment 1 should look like.
Comment 5 shoe200 2023-03-28 17:01:57 UTC
Dear all,
it seems everybody thinks different about the meaning of "scale", it is strictly geometrical. I attached 3 images for demo. I need a diagram with identical scale in x and y axis, see the files:

1_unequal axis scale = this is the standard setting in CALC, both of the axis scales fit to the length and width of the diagram. In consequence each axes' scale shrinks or expands, so that they fit to the diagram size. The diagram is distorted.

2_equal axis scale = this is my request, I need to export the diagram with exactly identical scaling in x and y axis. In consequence the diagram size changes if the values change, the scales are identical and fix. Although it is irritating if the diagram size changes permanently, it would be an option just to implement this feature in the export workflow, like an option "export undistorted".

3_final result = a file which is automatically generated by CALC - except the scaling. Actually I need to export the diagram and do the scaling manually with Libre Office DRAW.
Comment 6 shoe200 2023-03-28 17:04:28 UTC
Created attachment 186265 [details]
1_unequal axis scale
Comment 7 shoe200 2023-03-28 17:06:18 UTC
Created attachment 186266 [details]
2_equal axis scale --> this is the option I wish
Comment 8 shoe200 2023-03-28 17:08:06 UTC
Created attachment 186267 [details]
3_final result: this is the result of my work, scale = exactly 1:1
Comment 9 QA Administrators 2023-03-29 03:26:07 UTC Comment hidden (obsolete)
Comment 10 Heiko Tietze 2023-03-29 08:31:25 UTC
Had a private communication with the OP and planned to bring it back to BZ but forgot, sorry.

The desired functionality is an equally scaled diagram inside the chart object. It can be achieved by defining the proper size for the chart (Position and Size), plus deleting all legends and axis labels. Eventually the inner diagram (aka wall) can be moved to top-left and scaled per mouse to the maximum. At least this is how I understand the needs.

The formalized request would be to provide controls for a (relative) position and size for the wall.
Comment 11 Heiko Tietze 2023-03-29 08:35:19 UTC
Created attachment 186277 [details]
Workflow to achieve square diagrams

Illustration to comment 10
Comment 12 Regina Henschel 2023-03-29 11:38:00 UTC
(In reply to Heiko Tietze from comment #10)
> The desired functionality is an equally scaled diagram inside the chart
> object. It can be achieved by defining the proper size for the chart
> (Position and Size), plus deleting all legends and axis labels. Eventually
> the inner diagram (aka wall) can be moved to top-left and scaled per mouse
> to the maximum. At least this is how I understand the needs.

No that will not work.

The request is, that the unit on x-axis and y-axis are displayed with the same length. I had missed such feature a lot myself.

If you have fixed min and max values you can get it manually by dragging the chart wall to the correct size. The chart wall will not be square in most cases. The size of the chart wall is without legends and labels. Manually changing does not work well, if the axis minimum and maximum are set to automatic, because a change in data might change the to be displayed width or height.

The feature is only meaningful for xy-charts because in other charts the x-axis is not a value axis but a category axis.

I think this report is duplicate to bug 43174 in regard to axis scaling.

Exporting a chart to SVG and the needed features in such export is a different topic.
Comment 13 Heiko Tietze 2023-03-30 08:20:46 UTC
(In reply to Regina Henschel from comment #12)
> ...unit on x-axis and y-axis are displayed with the same length.
What is the length of a unit?

> If you have fixed min and max values you can get it manually by dragging the
> chart wall to the correct size.
Therefore me concluded in comment 10 that we have to expose the wall position/size in the UI.

> I think this report is duplicate to bug 43174 in regard to axis scaling.
You can easily set a min/max.
Comment 14 Regina Henschel 2023-03-30 10:44:23 UTC
(In reply to Heiko Tietze from comment #13)
> (In reply to Regina Henschel from comment #12)
> > ...unit on x-axis and y-axis are displayed with the same length.
> What is the length of a unit?

If you draw an xy-chart manually you will decide whether you will use 1cm or 5mm for the unit "1". Such setting is missing in LibreOffice.

One mode of the desired behavior is, that you can force the axis to use a specific length for the unit "1" and that length is kept when resizing the chart object and when exporting the chart.

> 
> > If you have fixed min and max values you can get it manually by dragging the
> > chart wall to the correct size.
> Therefore me concluded in comment 10 that we have to expose the wall
> position/size in the UI.

That would indeed be a great help for manually tweaking the chart.

> 
> > I think this report is duplicate to bug 43174 in regard to axis scaling.
> You can easily set a min/max.

A second mode would be, that x-axis and y-axis use the same length for the unit "1" but in case min/max is set to 'automatic', this length adapts to the actual data values and the length adapts to the size of the chart object.
Comment 15 Heiko Tietze 2023-03-30 11:51:21 UTC
(In reply to Regina Henschel from comment #14)
> If you draw an xy-chart manually you will decide whether you will use 1cm or
> 5mm for the unit "1".

The diagram size minus the wall size divide by the maximum is the size of steps on the axis. If you define the step in metrical units this affects the overall size of the diagram - and vice versa.
Comment 16 shoe200 2023-03-30 20:05:35 UTC
Created attachment 186340 [details]
New panel for "true size" X/Y diagram image export
Comment 17 Heiko Tietze 2023-03-31 08:08:26 UTC
(In reply to shoe200 from comment #16)
> Created attachment 186340 [details]
> New panel for "true size" X/Y diagram image export

If you modify the diagram on export you wont see what you do. For example, the diagram has units in mm and a size of 5 x 7cm. Now you check cm and x=y - that changes the diagram completely. Somewhat related are chart styles, as discussed in bug 62925.

What do you think about the wall properties idea? I still believe you can do anything else with a couple of clicks right now.
Comment 18 shoe200 2023-03-31 14:46:21 UTC
It is uncomfortable to work with a diagram which is up to 200 x 90 cm, see attachment. The diagram needs to be printed on a plotter, see attachment.
Comment 19 shoe200 2023-03-31 14:49:30 UTC
Created attachment 186370 [details]
CALC screenshot to demonstrate the dimensions.
Comment 20 Regina Henschel 2023-03-31 14:59:31 UTC
Created attachment 186371 [details]
xy-chart with min/max and suitable chart wall size

Heiko is right. I was not aware, that the needed Position&Size setting for the chart wall is already available. So manually forcing equal axis scale is already possible.
I have exported the chart to png and svg and have got no size problems. The png-export contains the needed dpi information and the svg export has the correct viewBox. The grid is 1cm in the exported images, as intented.

So it is not clear to me, what you request.
Comment 21 Heiko Tietze 2023-04-03 10:15:02 UTC
(In reply to Regina Henschel from comment #20)
> So it is not clear to me, what you request.

(In reply to shoe200 from comment #18)
> It is uncomfortable to work with a diagram which is up to 200 x 90 cm...

This makes sense. You want to work on a small diagram and export/print later in a large size. It is, however, not the same as 

> It would be nice to have an option like "Scale X and Y axis identically" in XY diagram export.

I don't see a good solution for the scaling problem. Maybe the chart style as discussed in bug 90490.

Changing the diagram per Position/Size should scale it up properly, what's probably missing is the font size, line width, etc. If so, these details need to be discussed here.

You also might not want to change Pos/Size of the diagram but the wall inside. The flexible idea is to get rid of any spacing so both parameters are the same (comment 10). Can be done per mouse in the Format Wall dialog but not as input of attributes.

The alternative is to add the wall size to the P&S dialog (and not the Chart Wall dialog).  Which means you change the inner wall size affecting the overall diagram size or vice versa. Not so nice. The last resort is to keep the wall attributes together and to _show_ the diagram P&S values next to it (changing the wall size above the maximum of the diagram  has an effect on the overall diagram size).

In the end I wonder if this issue wouldn't be solved better per macro.
Comment 22 Heiko Tietze 2023-04-13 07:32:34 UTC
The topic was on the agenda of the design meeting but didn't receive further input.

The use case is quite interesting and very worth to get supported. And while it's clear that working with a diagram up to 200 x 90 cm is uncomfortable, the "Export as PNG" function allows to change the image size / dpi and the actual problem is not clear. It might be that labels are scaled as well, which could be solved by a to-be-introduced chart style, see bug 62925 or bug 90490, meaning you would work on a normal sized diagram but apply a chart style that changes all labels to a tiny size before export. In this case the request would be a duplicate. The other discussed aspect was the fact that diagrams do not have an exact size, it's always diagram + wall = chart. The wall can be minimized manually only, and the input of exact values might be desired. However, making the diagram sized exactly as the export works only without axis labels (maybe if labels are inside?). And therefore this is not requested here.

So ultimately I resolve the ticket due to insufficient data. Many improvements are planned, and some very special workflows might be solved per macro out of the box anyway.