@@ -8,11 +8,17 @@ const defaultOptions = {
88 * @default : derived from borderColor
99 */
1010 color : undefined ,
11+
1112 /**
12- * with as number, or as string with pixel (px) ending, or as string with percentage (%) ending
13+ * width as number, or as string with pixel (px) ending, or as string with percentage (%) ending
1314 */
1415 width : 10 ,
1516
17+ /**
18+ * lineWidth as number, or as string with pixel (px) ending
19+ */
20+ lineWidth : 2 ,
21+
1622 /**
1723 * whether the error values are given in absolute values or relative (default)
1824 */
@@ -116,11 +122,13 @@ const ErrorBarsPlugin = {
116122 * @param minus negative error bar position
117123 * @param color error bar stroke color
118124 * @param width error bar width in pixel
125+ * @param lineWidth error ber line width
119126 * @param horizontal orientation
120127 * @private
121128 */
122- _drawErrorBar ( ctx , model , plus , minus , color , width , horizontal ) {
129+ _drawErrorBar ( ctx , model , plus , minus , color , width , lineWidth , horizontal ) {
123130 ctx . save ( ) ;
131+ ctx . lineWidth = lineWidth ;
124132 ctx . strokeStyle = color ;
125133 ctx . beginPath ( ) ;
126134 if ( horizontal ) {
@@ -204,7 +212,7 @@ const ErrorBarsPlugin = {
204212 const plus = vScale . getPixelForValue ( plusValue ) ;
205213 const minus = vScale . getPixelForValue ( minusValue ) ;
206214
207- this . _drawErrorBar ( ctx , bar , plus , minus , errorBarColor , errorBarWidth , horizontal ) ;
215+ this . _drawErrorBar ( ctx , bar , plus , minus , errorBarColor , errorBarWidth , options . lineWidth , horizontal ) ;
208216 }
209217 } ) ;
210218 } ) ;
0 commit comments