diff options
author | longphee <88870324+longphee@users.noreply.github.com> | 2022-03-09 12:34:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-09 12:34:48 +0800 |
commit | 74b1a998d6018785878ac43b4a4bdcb906766a40 (patch) | |
tree | 61db43ffd8cf0580922a3fc7e77ed1a23d6d0776 /drawing.go | |
parent | 56aa6b82637b3210be470a8ebac1fdec2b2a6a30 (diff) |
This closes #1172, support set hole size for doughnut (#1173)
Diffstat (limited to 'drawing.go')
-rw-r--r-- | drawing.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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)}, }, } } |