Bug 89943 - SVG graph export loses legend text depending on history
Summary: SVG graph export loses legend text depending on history
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:svg
Depends on:
Blocks: SVG-Import Chart-Labels
  Show dependency treegraph
 
Reported: 2015-03-11 04:07 UTC by Roland Roberts
Modified: 2023-11-06 22:58 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Spreadsheet with Graph, when exported as SVG legend text is missing (axis labels are fine) (31.69 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-03-13 16:07 UTC, Roland Roberts
Details
114084 att tweaked with titles, another ledgend and area fills (20.83 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-03-13 17:09 UTC, V Stuart Foote
Details
SVG export with 7.5.1.2 (16.88 KB, image/svg+xml)
2023-03-30 15:37 UTC, fenugrec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Roberts 2015-03-11 04:07:32 UTC
Version is reported 4.3.6.2-3.fc21

If I create a graph and add a legend, then export as SVG all if fine. If the legend was cut and pasted back into the same graph it came from, it displays fine, but when exported, the legend text is missing.
Comment 1 V Stuart Foote 2015-03-11 05:17:08 UTC
@Roland,

Your STR are a bit thin... but suspect this to be duplicate of bug 32248 - FILEOPEN SVG no TEXT visible

Please give us a bit more to work with, or close as duplicate.
Comment 2 Roland Roberts 2015-03-13 16:07:14 UTC
Created attachment 114084 [details]
Spreadsheet with Graph, when exported as SVG legend text is missing (axis labels are fine)
Comment 3 Roland Roberts 2015-03-13 16:14:56 UTC
I've added a spreadsheet that shows the problem. Text in general is displayed fine, and the symptom _only_ shows up is the legend is cut and pasted back into the graph.

I only found it because of an old habit. It used to be that if you dragged the legend to be on top of the graph, the graph boundaries did not resize. The only way to insert a legend overlaying part of the graph was to create it, cut it, then paste it back in. At some point that changed, and you can just drag the legend onto the graph area, so there's not reason for me to do it this way.

The legend text is fine when displayed in calc. It also displays fine when exported as PNG. Maybe its the same underlying problem as bug 32248, but that sounds like problems with importing SVGs.
Comment 4 V Stuart Foote 2015-03-13 17:01:26 UTC
Confirming
Version: 4.4.1.2
Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432
Locale: en_US

Similar but not bug 32248 which is for FileOpen. This is an export filter issue.

With the imported/copy pasted SVG its text is missing when rendered back out to SVG.

But with Export as Image as .PNG or .JPG, rather than .SVG, the text in the legend is present. So it is there and being read by export filter, the SVG text is just not being rendered correctly.

Attaching a riff on original ODS and chart with mix of background fills.
Comment 5 V Stuart Foote 2015-03-13 17:09:38 UTC
Created attachment 114085 [details]
114084 att tweaked with titles, another ledgend and area fills

same ODS with chart, some tweaks to add background fill, titles, and an additional legend.

STR

1. select chart
2. Export as Image
3. select SVG format
4. repeat select PNG, JPG, EMF format
5. different outputs from filter--but output filter to SVG format alone loses lettering of the pasted metafile, also mangles vertical lettering of y-axis title
Comment 6 tommy27 2016-04-16 07:24:28 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2019-05-14 02:56:07 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2021-05-14 04:12:50 UTC Comment hidden (obsolete)
Comment 9 fenugrec 2023-03-30 15:37:14 UTC
Created attachment 186328 [details]
SVG export with 7.5.1.2

Still a problem in 7.5.1.2 , albeit slightly different behaviour depending on software used to open the SVG. In inkscape and firefox, the text 'Y' appears at the top-left of the image, under the axis labels.
Comment 10 fenugrec 2023-03-30 15:38:06 UTC
Apologies, forgot to paste version info :
*********
Version: 7.5.1.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 16; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: en-CA (en_CA.UTF-8); UI: en-US
7.5.1-1
Calc: threaded
*******
Comment 11 Stéphane Guillou (stragu) 2023-11-05 18:04:25 UTC
(In reply to V Stuart Foote from comment #5)
> Created attachment 114085 [details]
> 5. [...] output filter to SVG format alone
> loses lettering of the pasted metafile, also mangles vertical lettering of
> y-axis title

Both reproduced in libreoffice-4.4.0.3, but works as expected (vertical text, Y in pasted metafile) at least since 5.0.0.3.

(In reply to Roland Roberts from comment #3)
> I've added a spreadsheet that shows the problem. Text in general is
> displayed fine, and the symptom _only_ shows up is the legend is cut and
> pasted back into the graph.

Same: reproduced in 4.4, fixed in 5.0.

(In reply to fenugrec from comment #9)
> Still a problem in 7.5.1.2 , albeit slightly different behaviour depending
> on software used to open the SVG. In inkscape and firefox, the text 'Y'
> appears at the top-left of the image, under the axis labels.

Likely bug 153672. If you can still see an issue in chart exports, please have a look at "see also" bugs linked to bug 153672 or report a new one.

Marking this one as "works for me". Thank you all!
Comment 12 fenugrec 2023-11-06 16:38:50 UTC
Thanks Stéphane,
better but unfortunately still some SVG export issues here on 7.6.2.1 - missing Y axis text. 153672 doesn't seem related (and works here), but 155488 is probably what I'm seeing (surprised that one didn't get marked as a Duplicate of this one.
Comment 13 Stéphane Guillou (stragu) 2023-11-06 22:58:26 UTC
(In reply to fenugrec from comment #12)
> Thanks Stéphane,
> better but unfortunately still some SVG export issues here on 7.6.2.1 -
> missing Y axis text. 153672 doesn't seem related (and works here), but
> 155488 is probably what I'm seeing (surprised that one didn't get marked as
> a Duplicate of this one.
It's a good thing bug 155488 didn't get marked as a duplicate of this one, as it only started in 7.5.
If you want, you can confirm you are indeed seeing bug 155488 by comparing exports in 7.4 and 7.5. I'm not sure which example file you are using, but I just confirmed it's the same regression while testing with attachment 114085 [details] from comment 5.