diff --git a/src/scales/scale.category.js b/src/scales/scale.category.js index 33a91f3a2c6..a994e3a1912 100644 --- a/src/scales/scale.category.js +++ b/src/scales/scale.category.js @@ -53,10 +53,15 @@ module.exports = function() { getLabelForIndex: function(index, datasetIndex) { var me = this; - var data = me.chart.data; + var chart = me.chart; + var data = chart.data; var isHorizontal = me.isHorizontal(); + var ds = typeof chart.getDatasetMeta === 'function' && chart.getDatasetMeta(datasetIndex).controller; + var isValue = typeof ds.getValueScaleId === 'function' + ? ds.getValueScaleId() === me.id + : null; - if (data.yLabels && !isHorizontal) { + if (isValue || (isValue === null && !isHorizontal)) { return me.getRightValue(data.datasets[datasetIndex].data[index]); } return me.ticks[index - me.minIndex];