diff options
author | xuri <xuri.me@gmail.com> | 2021-05-28 13:36:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 13:36:23 +0800 |
commit | 31d88a26241c32add01deff37ccc69cfe9efd03b (patch) | |
tree | 393c7767c9b7d75750f2f78c84d24eea140338e5 | |
parent | 056dc8454edb59758f06040195d40703c8b63900 (diff) | |
parent | faa50c3326f05833e560653f368b80cb2cf0fac0 (diff) |
Merge pull request #851 from si9ma/feat_disable_axis
feat: add disable option for chart xAxis and yAxis
-rw-r--r-- | drawing.go | 6 | ||||
-rw-r--r-- | xmlChart.go | 1 |
2 files changed, 4 insertions, 3 deletions
@@ -966,7 +966,7 @@ func (f *File) drawPlotAreaCatAx(formatSet *formatChart) []*cAxs { Max: max, Min: min, }, - Delete: &attrValBool{Val: boolPtr(false)}, + Delete: &attrValBool{Val: boolPtr(formatSet.XAxis.None)}, AxPos: &attrValString{Val: stringPtr(catAxPos[formatSet.XAxis.ReverseOrder])}, NumFmt: &cNumFmt{ FormatCode: "General", @@ -1020,7 +1020,7 @@ func (f *File) drawPlotAreaValAx(formatSet *formatChart) []*cAxs { Max: max, Min: min, }, - Delete: &attrValBool{Val: boolPtr(false)}, + Delete: &attrValBool{Val: boolPtr(formatSet.YAxis.None)}, AxPos: &attrValString{Val: stringPtr(valAxPos[formatSet.YAxis.ReverseOrder])}, NumFmt: &cNumFmt{ FormatCode: chartValAxNumFmtFormatCode[formatSet.Type], @@ -1069,7 +1069,7 @@ func (f *File) drawPlotAreaSerAx(formatSet *formatChart) []*cAxs { Max: max, Min: min, }, - Delete: &attrValBool{Val: boolPtr(false)}, + Delete: &attrValBool{Val: boolPtr(formatSet.YAxis.None)}, AxPos: &attrValString{Val: stringPtr(catAxPos[formatSet.XAxis.ReverseOrder])}, TickLblPos: &attrValString{Val: stringPtr("nextTo")}, SpPr: f.drawPlotAreaSpPr(), diff --git a/xmlChart.go b/xmlChart.go index 85a2c5c..a838f51 100644 --- a/xmlChart.go +++ b/xmlChart.go @@ -520,6 +520,7 @@ type cPageMargins struct { // formatChartAxis directly maps the format settings of the chart axis. type formatChartAxis struct { + None bool `json:"none"` Crossing string `json:"crossing"` MajorGridlines bool `json:"major_grid_lines"` MinorGridlines bool `json:"minor_grid_lines"` |