Category scale filter function will hide the grid line if null or undefined returned.

This commit is contained in:
Evert Timberg
2015-08-23 13:20:43 -04:00
parent 28b3a90723
commit 04d1f0f710
3 changed files with 6 additions and 2 deletions

View File

@@ -403,6 +403,9 @@ The `userCallback` method may be useful when there are a lot of labels. The foll
xAxes: [{
labels: {
maxRotation: 0, // set maxRotation to 0 to turn off auto-rotation
// Return an empty string to draw the grid line but hide the label
// Return `null` or `undefined` to hide the grid line
userCallback: function(labelString, index) {
return (index % 5 === 0) ? labelString : '';
}