antvis/G2










The issue has been closed
[Bug]: 设置了scrollbar属性后,条形图上的labels 被隐藏 #6617
chenaaaa1111 posted onGitHub
Describe the bug / 问题描述
import { Chart } from '@antv/g2';
const chart = new Chart({ container: 'container' });
chart
.interval()
.data([
{ genre: 'Sports', sold: 0 },
{ genre: 'Strategy', sold: 115 },
{ genre: 'Action', sold: 120 },
{ genre: 'Shooter', sold: 350 },
{ genre: 'Other', sold: 150 },
])
.encode('x', 'genre')
.encode('y', 'sold')
.encode('color', 'genre')
.style('minHeight', 50).label({
text: "sold",
color: "#fff",
dy: -8,
transform: [
{
// type: "exceedAdjust",
},
],
}).scrollbar('x',{ ratio: 0.5 });
chart.render();
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
No response
Version / 版本
Please select / 请选择
OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他