-
Notifications
You must be signed in to change notification settings - Fork 186
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
去掉右边的Y轴 #68
Comments
可以,直接: chart.axis('你要去掉的坐标轴字段名', false); |
感觉还是按照右边坐标轴来画,只是把右边的坐标轴文本隐藏掉了 |
恩,这是因为我在 demo 里面,将两个坐标轴的最大值和最小值设置成相同了呢: 你看,两个字段的列定义是一样的: chart.source(data, {
tem: {
min: 0,
max: 30,
tickInterval: 10,
nice: false
},
rain: {
min: 0,
max: 30,
tickInterval: 10,
nice: false
}
}); |
我试了,如果把上述这一段去掉,然后加上chart.axis('你要去掉的坐标轴字段名', false); |
能截个图说明下你想要的样子么? 或者把你的代码给我看一下,我可能不是特别理解你想要的效果,我根据你的需求帮你调整一下 |
不是按照左边的坐标轴来显示数据的 |
恩,我明白了,这是因为柱状图和线图的Y 轴数据范围不同导致的。。。 你把你的原始数据给我下,我帮你调整下 |
let data = [{ |
demo 在这里: https://codepen.io/Sima/pen/djEzME 这是因为两边坐标轴的数值范围不同,层叠柱状图的数据会进行累加,你将右侧 Y 轴的 min 和 max 保持同 左侧的相同即可。 如果你的数据是动态的话。你需要手动计算下数据集中的最大值和最小值,如果是静态的话,你看下绘制出来坐标轴的最大和最小值,手动设置下就可以了。 |
好的,谢谢小姐姐 |
AntV Design Charts中如何像你这样隐藏右侧的Y轴
|
例如:https://antv.alipay.com/zh-cn/f2/3.x/demo/other/multiple-y.html
这种双Y轴,如果量级相同,能不能去掉右边的Y轴,根据左边的坐标轴来画图
The text was updated successfully, but these errors were encountered: