Skip to content
New issue

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

🐛[BUG]折线图的bursh,y轴的起始点一直是0,无法灵活变动 #2774

Open
susanwei126 opened this issue Nov 15, 2024 · 0 comments

Comments

@susanwei126
Copy link

🐛 bug 描述

使用line图,x轴有三个值,对于每一个x值,纵轴y轴有2000个值,希望brush选中区域放大,有两个问题:

  1. brush选中区域放大之后,y轴的最大值发生变化,y轴起点永远是0,无法随着区域的改变而改变,导致很多数据堆积在chart顶部
  2. 因为每一个x值对应了2000个y值,brush之后集中在chart顶部,导致很多点无法展示在页面上

还有一个问题,y轴怎么加上slider呢,如下尝试都没用:
scrollbar: {
yAxis: true,
},
slider: {
yAxis: true,
},

谢谢。

📷 复现步骤 [清晰描述复现步骤,让别人也能看到问题]

一个x值对应2000个y值的情况
Screenshot 2024-11-15 at 11 15 03

很多点无法展示出来,堆积在chart上方:
Screenshot 2024-11-15 at 11 16 48

🏞 期望结果

  1. y轴的起始点,随着brush选中区域的变化而变化
  2. y轴加上slider

💻 复现代码

const config = {
data: jsonData,
xField: 'param',
yField: 'value',
seriesField: 'pos',
legend: false,
interactions: [
{
type:'brush',
},
],
};

<Line {...config} />

© 版本信息

"@ant-design/charts": "^1.4.3",
"@ant-design/icons": "^4.6.2",
"@ant-design/pro-components": "2.6.41",
"antd": "^4.24.7",

  • 浏览器环境 chrome Version 130.0.6723.117
  • 开发环境 mac os

🚑 其他信息 [如截图等其他信息可以贴在这里]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant