The issue has been closed
What problem does this feature solve?
双y轴的刻度线对齐
What does the proposed API look like?
双y轴的刻度线对齐
<!-- generated by antv-issue-helper. DO NOT REMOVE -->

目前暂时无法做到,这个算法比较复杂。当前解法暂时为以下 3 种:
- 同步 双轴的 max min 范围,这样自然是对其的
- 关闭其中一层,防止 grid 线条会很混乱
- 两个 scale 自定义 tick,保持比例一致
posted by hustcc almost 4 years ago
@pearmini 可以考虑下两个 scale 同步 ticks 的算法~
posted by hustcc almost 4 years ago
posted by pearmini almost 4 years ago 
@bancangyanyu 要是你的对应Y轴上的 scale
中的 tickCount
的数量是自定义设置的话,那么双 Y
轴上的 tickCount
可以设置相同,可以解决不对齐的问题。
posted by BraveHead almost 4 years ago
posted by yehoan almost 3 years ago 
posted by yehoan almost 3 years ago 
我看示例的 不是这样的啊 至少刻度线是统一的才对啊
posted by yehoan almost 3 years ago
可以参考我的做法
meta: {
tt: {
alias: '在租天数',
sync: true,
min: 0,
max: max1,
tickInterval: getNumber(max1) / 5,
tickCount: 5,
},
amount: {
alias: '新增订单金额',
sync: true,
min: 0,
max: max2,
tickInterval: getNumber(max2) / 5,
tickCount: 5,
},
}
posted by cdx111 over 1 year ago
可以参考我的做法 meta: { tt: { alias: '在租天数', sync: true, min: 0, max: max1, tickInterval: getNumber(max1) / 5, tickCount: 5, }, amount: { alias: '新增订单金额', sync: true, min: 0, max: max2, tickInterval: getNumber(max2) / 5, tickCount: 5, }, }
getNumber是什么方法
posted by Calmio-Y 9 months ago
getNumber
一个普通字符串转number的方法
posted by cdx111 9 months ago
posted by pearmini 8 months ago