summaryrefslogtreecommitdiff
path: root/drawing.go
diff options
context:
space:
mode:
Diffstat (limited to 'drawing.go')
-rw-r--r--drawing.go7
1 files changed, 6 insertions, 1 deletions
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)},
},
}
}