We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
label
series: [ { name: '稽查量', barWidth: 20, type: 'bar', stack: '模型', label: { show: true, //开启显示 position: 'top', //在上方显示 formatter: '{c}%', //显示百分号 textStyle: { //数值样式 color: 'black', //字体颜色 fontSize: 10 //字体大小 } } } ]
position
inside(自适应,柱状内部中央),top(柱状外的正上方),bottom(柱状外的正下方),left(柱状外的左边),right(柱状外的右边)。
inside
top
bottom
left
right
坐标[x,y](以柱状的顶部为原点))。
insideTop(柱状内部靠顶部),insideBottom(柱状内部靠下方),insideRight(柱状内部靠右边),insideLeft(柱状内部靠左边)。
insideTop
insideBottom
insideRight
insideLeft
/--分割线-/
series: [ { name: '访问来源', type: 'pie', radius: '50%', data: [ {value: 1048, name: '搜索引擎'}, {value: 735, name: '直接访问'}, {value: 580, name: '邮件营销'}, {value: 484, name: '联盟广告'}, {value: 300, name: '视频广告'} ], label:{ // 较官方示例添加的代码 show:true, position: 'inside', formatter: '{b} : {c} ({d}%)' }, emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } } ]
效果图:
series: [ { name: '直接访问', type: 'bar', emphasis: { focus: 'series' }, data: [320, 332, 301, 334, 390, 330, 320], label:{ show:true position: 'inside' } }, ]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
如何显示数值: (添加
label
属性)position
的其它属性值inside
(自适应,柱状内部中央),top
(柱状外的正上方),bottom
(柱状外的正下方),left
(柱状外的左边),right
(柱状外的右边)。坐标[x,y](以柱状的顶部为原点))。
insideTop
(柱状内部靠顶部),insideBottom
(柱状内部靠下方),insideRight
(柱状内部靠右边),insideLeft
(柱状内部靠左边)。/--分割线-/
官方饼图示例
效果图:
堆叠柱状图示例
效果图:
The text was updated successfully, but these errors were encountered: