GNOME Bugzilla – Bug 746321
[ods] dual y axis
Last modified: 2015-03-22 21:37:00 UTC
The dual-Y axis test in graph-tests isn't showing up right in localc for me. (Sheet axes near row 189.) Left side has ticks; neither side has numbers. This might be our or their fault.
I am quite surprised that LO would at all recognize dual axes. I am not aware of any way that is supported by ODF so we are using our own extensions. It would be nice to have an recent-LO-generated file that contains a simple graph with dual y-axes.
LO does seem to support it. ./ssconvert ../samples/graph-tests.gnumeric ~/g.xlsx localc ~/g.xlsx Last graph on "Axes" sheet.
Created attachment 299668 [details] localc-created dual axis sample The second axis can be chosen via format data series after the series has been added.
The operative part seems to be a simple repetition of the chart:axis element. I note the lack of positioning information. <chart:axis chart:dimension="x" chart:name="primary-x" chart:style-name="ch5"/> <chart:axis chart:dimension="y" chart:name="primary-y" chart:style-name="ch5"> <chart:grid chart:style-name="ch6" chart:class="major"/> </chart:axis> <chart:axis chart:dimension="y" chart:name="secondary-y" chart:style-name="ch7"/> <chart:series chart:attached-axis="primary-y" chart:style-name="ch8" chart:values-cell-range-address="Sheet1.B1:Sheet1.B3" chart:class="chart:scatter"> <chart:domain table:cell-range-address="Sheet1.A1:Sheet1.A3"/> <chart:data-point chart:repeated="3"/> </chart:series> <chart:series chart:attached-axis="secondary-y" chart:style-name="ch9" chart:values-cell-range-address="Sheet1.C1:Sheet1.C3" chart:class="chart:scatter"> <chart:data-point chart:repeated="3"/> </chart:series>
Export to localc should now be somewhat improved. My reading of the ODF description didn't seem to allow for multiple axes in the same dimension but the ODF schema in fact allows it, so we can do the same as localc. We still aren't reading localcs version well.
We are now importing the localc axis. I still have to change the mechanism to attach axes to the series. I had completely missed the chart:attached-axis attribute.
WE are now importing dual.ods reasonably.
We are still losing the tick labels when importing into LOCalc. I have separated that into bug #746621.
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.