From d1926675f81fcf9afb658e1e51cd4e43d0d05bc9 Mon Sep 17 00:00:00 2001 From: xuri Date: Sun, 11 Oct 2020 00:15:04 +0800 Subject: - Resolve #627, improve multi-series line chart compatibility with KingSoft WPS - Avoid to create duplicate style - Update unit test for the auto filter - Init code scanning alerts --- drawing.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drawing.go') diff --git a/drawing.go b/drawing.go index 6c2f635..666b23d 100644 --- a/drawing.go +++ b/drawing.go @@ -770,13 +770,11 @@ func (f *File) drawChartSeriesSpPr(i int, formatSet *formatChart) *cSpPr { Ln: &aLn{ W: f.ptToEMUs(formatSet.Series[i].Line.Width), Cap: "rnd", // rnd, sq, flat + SolidFill: &aSolidFill{ + SchemeClr: &aSchemeClr{Val: "accent" + strconv.Itoa((formatSet.order+i)%6+1)}, + }, }, } - if i+formatSet.order < 6 { - spPrLine.Ln.SolidFill = &aSolidFill{ - SchemeClr: &aSchemeClr{Val: "accent" + strconv.Itoa(i+formatSet.order+1)}, - } - } chartSeriesSpPr := map[string]*cSpPr{Line: spPrLine, Scatter: spPrScatter} return chartSeriesSpPr[formatSet.Type] } -- cgit v1.2.1