chenjiandongx opened a new issue #8807: Y 轴设置为 category 时 Y 轴标签显示的是其索引而不是其值 URL: https://github.com/apache/incubator-echarts/issues/8807 <!-- 为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。 --> ### One-line summary [问题简述] Echarts V4.1.0 版本开始 Y 轴设置为 category 时 Y 轴标签显示的是其索引(推测)而不是其值 ### Version & Environment [版本及环境] + ECharts version [ECharts 版本]: V4.1.0 + + Browser version [浏览器类型和版本]: Chrome 版本 68.0.3440.75(正式版本) + OS Version [操作系统类型和版本]: Windows10 V4.1.0 实际效果  V4.0.3 正常效果  相同的 Option,没有代码变动,除了 Echarts 版本 Options ``` var option = { "title": [ { "text": "x \u8f74\u548c y \u8f74\u4ea4\u6362", "left": "auto", "top": "auto", "textStyle": { "fontSize": 18 }, "subtextStyle": { "fontSize": 12 } } ], "toolbox": { "show": true, "orient": "vertical", "left": "95%", "top": "center", "feature": { "saveAsImage": { "show": true, "title": "\u4e0b\u8f7d\u56fe\u7247" }, "restore": { "show": true }, "dataView": { "show": true } } }, "series_id": 4152209, "tooltip": { "trigger": "item", "triggerOn": "mousemove|click", "axisPointer": { "type": "line" }, "textStyle": { "fontSize": 14 }, "backgroundColor": "rgba(50,50,50,0.7)", "borderColor": "#333", "borderWidth": 0 }, "series": [ { "type": "bar", "name": "\u5546\u5bb6A", "data": [ 5, 20, 36, 10, 75, 90 ], "barCategoryGap": "20%", "label": { "normal": { "show": false, "position": "top", "textStyle": { "fontSize": 12 } }, "emphasis": { "show": true, "textStyle": { "fontSize": 12 } } }, "markPoint": { "data": [] }, "markLine": { "data": [] }, "seriesId": 4152209 }, { "type": "bar", "name": "\u5546\u5bb6B", "data": [ 10, 25, 8, 60, 20, 80 ], "barCategoryGap": "20%", "label": { "normal": { "show": false, "position": "top", "textStyle": { "fontSize": 12 } }, "emphasis": { "show": true, "textStyle": { "fontSize": 12 } } }, "markPoint": { "data": [] }, "markLine": { "data": [] }, "seriesId": 4152209 } ], "legend": [ { "data": [ "\u5546\u5bb6A", "\u5546\u5bb6B" ], "selectedMode": "multiple", "show": true, "left": "center", "top": "top", "orient": "horizontal", "textStyle": { "fontSize": 12 } } ], "xAxis": [ { "show": true, "nameLocation": "middle", "nameGap": 25, "nameTextStyle": { "fontSize": 14 }, "axisTick": { "alignWithLabel": false }, "inverse": false, "boundaryGap": true, "type": "value", "splitLine": { "show": false }, "axisLabel": { "interval": "auto", "rotate": 0, "margin": 8, "textStyle": { "fontSize": 12 } } } ], "yAxis": [ { "show": true, "nameLocation": "middle", "nameGap": 25, "nameTextStyle": { "fontSize": 14 }, "axisTick": { "alignWithLabel": false }, "inverse": false, "boundaryGap": true, "type": "category", "splitLine": { "show": true }, "axisLabel": { "interval": "auto", "formatter": "{value} ", "rotate": 0, "margin": 8, "textStyle": { "fontSize": 12 } }, "data": [ "\u886c\u886b", "\u7f8a\u6bdb\u886b", "\u96ea\u7eba\u886b", "\u88e4\u5b50", "\u9ad8\u8ddf\u978b", "\u889c\u5b50" ] } ], "color": [ "#c23531", "#2f4554", "#61a0a8", "#d48265", "#749f83", "#ca8622", "#bda29a", "#6e7074", "#546570", "#c4ccd3", "#f05b72", "#ef5b9c", "#f47920", "#905a3d", "#fab27b", "#2a5caa", "#444693", "#726930", "#b2d235", "#6d8346", "#ac6767", "#1d953f", "#6950a1", "#918597", "#f6f5ec" ] }; ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
