diff --git a/src/component/categoryAxis.js b/src/component/categoryAxis.js index 37e5b646be4d58498349b9d28c66029f3cf6c99d..e4cc0307f389ca25bc8b4fe079dbb33961599597 100644 --- a/src/component/categoryAxis.js +++ b/src/component/categoryAxis.js @@ -668,11 +668,13 @@ define(function (require) { // 根据类目轴数据索引换算类目轴名称 function getNameByIndex(dataIndex) { - if (typeof option.data[dataIndex].value != 'undefined') { - return option.data[dataIndex].value; + var data = option.data[dataIndex]; + if (typeof data != 'undefined' && typeof data.value != 'undefined') + { + return data.value; } else { - return option.data[dataIndex]; + return data; } }