Skip to content

Commit 758855a

Browse files
author
recktenwaldf
committed
fix setting stroke color+width on pie abd doughnut chart
Stroke width and color setting are now properly passed to the chart widget using the elements:arc options
1 parent 89bd834 commit 758855a

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

src/ChartJS/widgets/DoughnutChart/widget/DoughnutChart.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ define([
103103
data: this._createDataSets(data),
104104
options: this._chartOptions({
105105

106-
//Boolean - Whether we should show a stroke on each segment
107-
segmentShowStroke : this.segmentShowStroke,
108-
109-
//String - The colour of each segment stroke
110-
segmentStrokeColor : this.segmentStrokeColor,
111-
112-
//Number - The width of each segment stroke
113-
segmentStrokeWidth : this.segmentStrokeWidth,
106+
elements: {
107+
arc: {
108+
//String - The colour of each segment stroke
109+
borderColor: this.segmentStrokeColor,
110+
//Number - The width of each segment stroke
111+
borderWidth: this.segmentShowStroke ? this.segmentStrokeWidth : 0
112+
}
113+
},
114114

115115
//Number - Amount of animation steps
116116
animationSteps : this.animationSteps,

src/ChartJS/widgets/PieChart/widget/PieChart.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ define([
107107
data: this._createDataSets(data),
108108
options: this._chartOptions({
109109

110-
//Boolean - Whether we should show a stroke on each segment
111-
segmentShowStroke : this.segmentShowStroke,
112-
113-
//String - The colour of each segment stroke
114-
segmentStrokeColor : this.segmentStrokeColor,
115-
116-
//Number - The width of each segment stroke
117-
segmentStrokeWidth : this.segmentStrokeWidth,
110+
elements: {
111+
arc: {
112+
//String - The colour of each segment stroke
113+
borderColor: this.segmentStrokeColor,
114+
//Number - The width of each segment stroke
115+
borderWidth: this.segmentShowStroke ? this.segmentStrokeWidth : 0
116+
}
117+
},
118118

119119
//Number - Amount of animation steps
120120
animationSteps : this.animationSteps,

0 commit comments

Comments
 (0)