diff --git a/src/category.js b/src/category.js index 5143c6c..344100b 100644 --- a/src/category.js +++ b/src/category.js @@ -1,4 +1,4 @@ c3_chart_internal_fn.categoryName = function (i) { - var config = this.config; - return i < config.axis_x_categories.length ? config.axis_x_categories[i] : i; + var config = this.config, categoryIndex = Math.ceil(i); + return i < config.axis_x_categories.length ? config.axis_x_categories[categoryIndex] : i; };