(本文档仅供参考)
问题1:
在电子表格中的echarts图形使用横条图,然后想显示文字在上方,同时Y轴的文字不显示,
如下效果图:
解决方案:
可以使用扩展属性实现,如下:
{ //此部分控制Y轴不显示文字 "yAxis": { "type": "category", "boundaryGap": true, "axisTick": { "show": false }, "axisLabel": { "show": true, "textStyle": { "color": "none", }, }, }, "series": [{ "barWidth": 15, //柱子宽度 "barGap": 1, //柱子之间间距 "itemStyle": { "normal": { //这部分让指标提示显示在上方 "label": { "formatter": "{b}{c}千万元", "show": true, "position": "top", } } } }] }