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
V2.x中,折线图,当Y轴数据全是0的话,0轴居中显示了,期望能显示在最下方。 官方文档中并没有找到相关的配置:
V2.x 图表示例--> 基础折线图,把data的value全部改成0,即可复现该问题。 const DemoLine = () => { const data = [ { year: '1991', value: 0}, { year: '1992', value: 0}, { year: '1993', value: 0 }, { year: '1994', value: 0}, { year: '1995', value: 0 }, { year: '1996', value: 0}, { year: '1997', value: 0}, { year: '1998', value: 0}, { year: '1999', value: 0 }, ]; const config = { data, xField: 'year', yField: 'value', point: { shapeField: 'square', sizeField: 4, }, interaction: { tooltip: { marker: false, }, }, style: { lineWidth: 2, }, axis: { y: { min: 0, minLimit: 0 } }, }; return <Line {...config} />; };
在V1.x中,Y轴时显示在最底部的,时期望达到的效果:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
🧐 问题描述 [详细地描述问题,让大家都能理解]
V2.x中,折线图,当Y轴数据全是0的话,0轴居中显示了,期望能显示在最下方。
官方文档中并没有找到相关的配置:
💻 示例代码 [如果有必要,展示代码,线上示例,或仓库]
V2.x 图表示例--> 基础折线图,把data的value全部改成0,即可复现该问题。
const DemoLine = () => {
const data = [
{ year: '1991', value: 0},
{ year: '1992', value: 0},
{ year: '1993', value: 0 },
{ year: '1994', value: 0},
{ year: '1995', value: 0 },
{ year: '1996', value: 0},
{ year: '1997', value: 0},
{ year: '1998', value: 0},
{ year: '1999', value: 0 },
];
const config = {
data,
xField: 'year',
yField: 'value',
point: {
shapeField: 'square',
sizeField: 4,
},
interaction: {
tooltip: {
marker: false,
},
},
style: {
lineWidth: 2,
},
axis: {
y: {
min: 0,
minLimit: 0
}
},
};
return <Line {...config} />;
};
🚑 其他信息 [如截图等其他信息可以贴在这里]
在V1.x中,Y轴时显示在最底部的,时期望达到的效果:
The text was updated successfully, but these errors were encountered: