From 68a1704900e099e01377e29a5037b21d2a9ac036 Mon Sep 17 00:00:00 2001 From: pjh591029530 <52460532+pjh591029530@users.noreply.github.com> Date: Wed, 17 Jul 2024 08:44:16 +0800 Subject: [PATCH] This fix missing horizontal axis in scatter chart with negative values (#1953) Co-authored-by: Simmons <1815481@qq.com> --- drawing.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drawing.go b/drawing.go index 95d5366..545a22f 100644 --- a/drawing.go +++ b/drawing.go @@ -598,8 +598,7 @@ func (f *File) drawScatterChart(pa *cPlotArea, opts *Chart) *cPlotArea { DLbls: f.drawChartDLbls(opts), AxID: f.genAxID(opts), }, - CatAx: f.drawPlotAreaCatAx(pa, opts), - ValAx: f.drawPlotAreaValAx(pa, opts), + ValAx: append(f.drawPlotAreaCatAx(pa, opts), f.drawPlotAreaValAx(pa, opts)...), } } @@ -659,7 +658,7 @@ func (f *File) drawBubbleChart(pa *cPlotArea, opts *Chart) *cPlotArea { DLbls: f.drawChartDLbls(opts), AxID: f.genAxID(opts), }, - ValAx: []*cAxs{f.drawPlotAreaCatAx(pa, opts)[0], f.drawPlotAreaValAx(pa, opts)[0]}, + ValAx: append(f.drawPlotAreaCatAx(pa, opts), f.drawPlotAreaValAx(pa, opts)...), } if opts.BubbleSize > 0 && opts.BubbleSize <= 300 { plotArea.BubbleChart.BubbleScale = &attrValFloat{Val: float64Ptr(float64(opts.BubbleSize))}