-
Notifications
You must be signed in to change notification settings - Fork 601
feat: v2版子弹图bullet初稿 #1427
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
feat: v2版子弹图bullet初稿 #1427
Conversation
增加histogram的文档
嗨,子弹图在写单测的时候,可以判断下图例是否在展示区域内,相关 issue 见 #1442
|
好的 我注意这个 |
👍 我刚刚看了下 v1 版本的,好像这样子判断还不够,需要在判断下legendBBox minX、minY 是否小于 0(避免被其他误伤,导致被隐藏) |
|
刚按错了,嗯嗯 ,会判断的 |
// TODO 准备最近几天画一个设计图写一些思考来参考,不过最近时间不太葱郁,可能会晚点出来! |
src/plots/bullet/adaptor.ts
Outdated
}); | ||
|
||
// 做好排序兼容 | ||
const ranges = data[i].ranges.sort((a, b) => a - b); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sort 是会改变原数据吧~
周一在联系讨论:
|
rangeField: 'ranges', | ||
targetField: 'target', | ||
xField: 'title', | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个单测逻辑写的不对,应该单独为 transformData 进行写单测。现在这个单测相当于是断言 bullet 的数据处理逻辑一定走 transformData 这个方法,而至于 transformData 内部是否有修改,修改是否正确,测试不出来~
target: { | ||
min, | ||
max, | ||
sync: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 这里是要吧 measure、range、target 都同步 sync。所以应该做法是都设置 sync: 'a-same-key' 即可。sync: true 的意思,是自动以字段名称为 key 去同步。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的 measure, range,target 是不是应该直接是 [measureField], [rangeField], [targetField] ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经转换过了 不能直接用measureField这种 因为他是数组
style?: ShapeAttrs; | ||
size?: number; | ||
}; | ||
export type BulletData = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个类型定义应该不需要了吧~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有用 transformData的时候需要
大神们,V2 的子弹图能选竖起来的样式吗,包括多子弹图 |
会支持的 |
#1384 v2版子弹图bullet初稿