@@ -156,7 +156,7 @@ function fitWithPointLabels(scale) {
156156 var valueCount = getValueCount ( scale ) ;
157157 for ( i = 0 ; i < valueCount ; i ++ ) {
158158 pointPosition = scale . getPointPosition ( i , scale . drawingArea + 5 ) ;
159- textSize = measureLabelSize ( scale . ctx , plFont . lineHeight , scale . pointLabels [ i ] || '' ) ;
159+ textSize = measureLabelSize ( scale . ctx , plFont . lineHeight , scale . pointLabels [ i ] ) ;
160160 scale . _pointLabelSizes [ i ] = textSize ;
161161
162162 // Add quarter circle to make degree 0 mean top of circle
@@ -247,7 +247,7 @@ function drawPointLabels(scale) {
247247 var angle = helpers . toDegrees ( angleRadians ) ;
248248 ctx . textAlign = getTextAlignForAngle ( angle ) ;
249249 adjustPointPositionForLabelHeight ( angle , scale . _pointLabelSizes [ i ] , pointLabelPosition ) ;
250- fillText ( ctx , scale . pointLabels [ i ] || '' , pointLabelPosition , plFont . lineHeight ) ;
250+ fillText ( ctx , scale . pointLabels [ i ] , pointLabelPosition , plFont . lineHeight ) ;
251251 }
252252 ctx . restore ( ) ;
253253}
@@ -348,7 +348,10 @@ module.exports = LinearScaleBase.extend({
348348 LinearScaleBase . prototype . convertTicksToLabels . call ( me ) ;
349349
350350 // Point labels
351- me . pointLabels = me . chart . data . labels . map ( me . options . pointLabels . callback , me ) ;
351+ me . pointLabels = me . chart . data . labels . map ( function ( ) {
352+ var label = helpers . callback ( me . options . pointLabels . callback , arguments , me ) ;
353+ return label || label === 0 ? label : '' ;
354+ } ) ;
352355 } ,
353356
354357 getLabelForIndex : function ( index , datasetIndex ) {
0 commit comments