[gnumeric] xlsx: improve axis writing for surface charts.



commit 2aa4f7450f3f52141bb28d237b3e7ed7995d978e
Author: Morten Welinder <terra gnome org>
Date:   Tue Oct 24 09:05:47 2017 -0400

    xlsx: improve axis writing for surface charts.

 plugins/excel/ChangeLog            |    5 +++++
 plugins/excel/xlsx-write-drawing.c |   10 +++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index fff79ea..6f55449 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-24  Morten Welinder  <terra gnome org>
+
+       * xlsx-write-drawing.c (xlsx_write_axis): Write a pseudo-3d axis
+       as a serAx.
+
 2017-10-23  Morten Welinder  <terra gnome org>
 
        * xlsx-write-drawing.c (xlsx_write_one_plot): Recognize the third
diff --git a/plugins/excel/xlsx-write-drawing.c b/plugins/excel/xlsx-write-drawing.c
index a1693bb..836de0a 100644
--- a/plugins/excel/xlsx-write-drawing.c
+++ b/plugins/excel/xlsx-write-drawing.c
@@ -738,6 +738,7 @@ xlsx_write_axis (XLSXWriteState *state, GsfXMLOut *xml, GogPlot *plot, GogAxis *
        double d;
        gboolean user_defined;
        char *map_name;
+       const char *axis_tag;
 
 #ifdef DEBUG_AXIS
        g_printerr ("Writing axis %s [id=%d].  (discrete = %d)\n",
@@ -751,10 +752,13 @@ xlsx_write_axis (XLSXWriteState *state, GsfXMLOut *xml, GogPlot *plot, GogAxis *
                      "map-name", &map_name,
                      NULL);
 
-       if (gog_axis_is_discrete (axis))
-               gsf_xml_out_start_element (xml, "c:catAx");
+       if (gog_axis_get_atype (axis) == GOG_AXIS_PSEUDO_3D)
+               axis_tag = "c:serAx";
+       else if (gog_axis_is_discrete (axis))
+               axis_tag = "c:catAx";
        else
-               gsf_xml_out_start_element (xml, "c:valAx");
+               axis_tag = "c:valAx";
+       gsf_xml_out_start_element (xml, axis_tag);
        xlsx_write_chart_uint (xml, "c:axId", xlsx_get_axid (state, axis));
 
        gsf_xml_out_start_element (xml, "c:scaling");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]