After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 788728 - [ODS] Roundtrip problem for contour graph
[ODS] Roundtrip problem for contour graph
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export OOo / OASIS
git master
Other All
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2017-10-09 17:42 UTC by Regina Henschel
Modified: 2017-10-11 15:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example contour plot (3.04 KB, application/x-gnumeric)
2017-10-09 17:42 UTC, Regina Henschel
Details

Description Regina Henschel 2017-10-09 17:42:49 UTC
Created attachment 361201 [details]
Example contour plot

Open the attached file. It contains an example contour plot.
Save it to OpenDocument Format .ods.
Open the saved .ods file.

The chart is totally wrong.

Main problem:
On saving Gnumeric correctly writes first the <chart:domain> element for y-axis and second for x-axis. But on opening Gnumeric expects it the other way round.

Minor problems:
Gnumeric writes attribute chart:axis-position="start", but in original file it intersects in 0, so it has to be chart:axis-position="0", both for x-axis and y-axis. Because of this error the axes are at wrong position.

Gnumeric does not preserve the fill colors. In ODF colors for the individual major intervals of the (pseudo-)z-axis can be saved as properties of <chart:data-point> elements in the <chart:series> element. But such elements are missing.
Comment 1 Morten Welinder 2017-10-09 18:36:53 UTC
Clearly the chart doesn't come back right.  The problem might be in either
the writer or the reader.  Or both.
Comment 2 Morten Welinder 2017-10-09 18:40:47 UTC
localc reads it as column plot from the ods we save.
XL2013 doesn't load any graph.
Comment 3 Jean Bréfort 2017-10-09 19:11:38 UTC
And the graph looks clipped somehow. I don't understand how this happens.
Comment 4 Regina Henschel 2017-10-09 20:06:16 UTC
It is read problem. If you go into the .ods file and exchange the ranges of the two <chart:domain> elements manually, then the chart is correct besides the listed 'Minor problems'.

The order first y-axis, then x-axis is the correct order according 19.15.1 in the spec.
Comment 5 Andreas J. Guelzow 2017-10-10 00:23:19 UTC
The interpretation of the series inside the chart:domain for contour plots has been fixed.

Since Gnumeric does not support the specification of random colours for the colour axis, the "<chart:data-point> elements in the <chart:series> element" is overkill.

Since I am not aware of anybody else who supports contour plots in ODF at the moment, I am not to concerned with interoperability.
Comment 6 Andreas J. Guelzow 2017-10-10 02:26:27 UTC
I don't see the chart:axis-position issue, the applicable styles have:
gnm:axis-position-expression="0" chart:axis-position="0"

It would likely be nice to preserve the existence of the Color-Scale and the value of the color-map-name for the roundtrip into Gnumeric. I am leaving this bug open for that.
Comment 7 Morten Welinder 2017-10-10 13:21:57 UTC
Mildly off-topic: we don't roundtrip for xlsx either.  We seem to write
it, but not read it.
Comment 8 Andreas J. Guelzow 2017-10-10 17:24:46 UTC
We are now writing the z-axis for contour plots and round trip the color map in extended ODF.
Comment 9 Morten Welinder 2017-10-10 17:51:40 UTC
Looks good.  For the record, I still see a difference in the legend
area.  The original shows the colours on a scale, the roundtrip file
show textual intervals for each colour.
Comment 10 Andreas J. Guelzow 2017-10-10 18:10:29 UTC
Yes, that is the color scale I mentioned in comment 6.
Comment 11 Andreas J. Guelzow 2017-10-11 01:37:59 UTC
I have moved comment #7 into bug #788807.

This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.
Comment 12 Morten Welinder 2017-10-11 14:49:31 UTC
FWIW, XL2013 complains when loading our generated ods file: "The reference is not valid. References for titles, values, sizes or data labels must be a single cell, row or column."
Comment 13 Jean Bréfort 2017-10-11 14:57:12 UTC
Sure, XL does not support 2D ranges as we do, the issue was the same with xls format, of course, and import is even worse, since the data might not be inside a rectangle. I made some tests years ago, probably with XL2k, and could make contour plots in excel with an arbitrary collection of column and row vectors. That's why there are special plot types for contour and surface plots import from excel.
Comment 14 Andreas J. Guelzow 2017-10-11 15:20:08 UTC
For surface and contour plots ODF provides two ways of specifying the data. A sensible way and a non-sensible way in which the data is divided into slices. We are exporting in the sensible way and Excel fails loading it. That is an Excel problem. ODF 1.3 clearly specifies that method and so Excel should be able to load it.

We are now importing the excel versions by using the union of slices, since I did not realize we had special plot types for contour and surface plot import from excel.

In fact Excel exports contour plots to ODF as surface plots (i.e. with three-dimensional=true) but then sets the viewing direction from above so does it looks like a contour plot.