From 74b1a998d6018785878ac43b4a4bdcb906766a40 Mon Sep 17 00:00:00 2001 From: longphee <88870324+longphee@users.noreply.github.com> Date: Wed, 9 Mar 2022 12:34:48 +0800 Subject: This closes #1172, support set hole size for doughnut (#1173) --- drawing.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drawing.go') diff --git a/drawing.go b/drawing.go index 5582bb4..3af789f 100644 --- a/drawing.go +++ b/drawing.go @@ -513,13 +513,18 @@ func (f *File) drawBaseChart(formatSet *formatChart) *cPlotArea { // drawDoughnutChart provides a function to draw the c:plotArea element for // doughnut chart by given format sets. func (f *File) drawDoughnutChart(formatSet *formatChart) *cPlotArea { + holeSize := 75 + if formatSet.HoleSize > 0 && formatSet.HoleSize <= 90{ + holeSize = formatSet.HoleSize + } + return &cPlotArea{ DoughnutChart: &cCharts{ VaryColors: &attrValBool{ Val: boolPtr(formatSet.VaryColors), }, Ser: f.drawChartSeries(formatSet), - HoleSize: &attrValInt{Val: intPtr(75)}, + HoleSize: &attrValInt{Val: intPtr(holeSize)}, }, } } -- cgit v1.2.1