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

feat: violin #2593

Merged
merged 18 commits into from
Jun 4, 2021
Merged

feat: violin #2593

merged 18 commits into from
Jun 4, 2021

Conversation

visiky
Copy link
Member

@visiky visiky commented May 29, 2021

PR includes

  • features: ✅ animation ✅ annotations ✅ tooltip ✅ meta ✅ legend ⭕️ label
  • add / modify test cases
  • documents, demos

Screenshot

Before After
image 重复轴 image
image image
image image
image image

@github-actions
Copy link
Contributor

github-actions bot commented May 29, 2021

🎊 PR Preview b5560fb has been successfully built and deployed to https://antvis-G2Plot-preview-pr-2593.surge.sh?type=diff&date=2021-06-04

🕐 Build time: 103.169s

🤖 By surge-preview

@coveralls
Copy link

coveralls commented May 29, 2021

Pull Request Test Coverage Report for Build 905583120

  • 251 of 269 (93.31%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 96.042%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/plots/violin/adaptor.ts 85 87 97.7%
src/utils/transform/quantile.ts 83 99 83.84%
Totals Coverage Status
Change from base Build 901803003: -0.2%
Covered Lines: 5893
Relevant Lines: 5987

💛 - Coveralls

@visiky visiky requested a review from hustcc May 29, 2021 05:10
@visiky visiky force-pushed the violin branch 3 times, most recently from e78c800 to abde4da Compare May 30, 2021 04:44
src/plots/violin/adaptor.ts Show resolved Hide resolved
src/plots/violin/constant.ts Show resolved Hide resolved
@lxfu1
Copy link
Member

lxfu1 commented Jun 1, 2021

surge-preview@v2 改用 surge-preview@v2.0.1 , 其它分支已经提 PR 了。

__tests__/unit/plots/violin/tooltip-spec.ts Show resolved Hide resolved
it('tooltip: customContent', () => {
violin.update({
tooltip: {
customContent: () => '<div class="custom-tooltip">xxx</div>',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

customContent 怎么使用值呢

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

customContent(title, items) => <div class="custom-tooltip">{title}{items.map(item => item.data.y)}</div>

docs/api/plots/violin.en.md Outdated Show resolved Hide resolved
src/plots/violin/adaptor.ts Outdated Show resolved Hide resolved
{
type: 'text',
position: ['median', 'median'],
content: '辅助文本',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 annotation 是什么效果?
是不是应该加个 example

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

图形标注(我不知道有什么应用场景)

YiSiWang and others added 17 commits June 4, 2021 16:03
* feat(violin): 添加小提琴图

* fix(violin): demo 的数据放到 CDN

* doc(violin): 更新截图

* fix(violin): x 轴字段用常量定义

* refactor(violin): 去除 simple-statistics 包依赖,减小体积

* fix(violin): 修复不响应用户 tooltip 选项的问题

* fix(violin): 修复小提琴图中箱线图四分位的计算问题

* fix(violin): smooth 和 hollow API 改为 shape, 重命名字段常量

* docs(violin): 优化 box.textMap 的文档和 Demo

* feat(violin): 使用 geometry 通用 adaptor, 添加格式化支持

* fix(violin): 修复 shape 通道未映射的问题

Co-authored-by: 14 <yisi.wys@antfin.com>
@hustcc hustcc merged commit 10e23bf into master Jun 4, 2021
@hustcc hustcc deleted the violin branch June 4, 2021 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants