Skip to content

Conversation

bingling-sama
Copy link
Contributor

@bingling-sama bingling-sama commented Apr 15, 2025

Checklist
  • npm test passes
  • benchmarks are included
  • commit message follows commit guidelines
  • documents are updated
Description of change

按照 #5904 的要求迁移官网4.0的样例

原 Issue 中的「色块图」和 v5 文档中的 「华夫饼图」 好像是一样的,故不再重复实现。

新增了 4.0 中的 「日历色块图」和「水平日历色块图」
图标样式上还没有完全还原,待后续优化

截图(样式还需修改,先不用上传图床):

「日历色块图」
image

「水平热力色块图」
image

@bingling-sama
Copy link
Contributor Author

有三个疑问:

  • 原 Issue 中提到的 v4 文档中的「极坐标下的色块图」是否还需要再实现?
  • 「日历色块图」使用到的 facetRect 如何设置换行?
  • 「水平日历色块图」中月末周的分割线如何使用 v5 api 实现?

恳请指教 @hustcc

@bingling-sama bingling-sama marked this pull request as ready for review April 18, 2025 16:07
@interstellarmt
Copy link
Contributor

原 Issue 中提到的 v4 文档中的「极坐标下的色块图」是否还需要再实现?

是需要迁移的~

「日历色块图」使用到的 facetRect 如何设置换行?

可以给月份横坐标分成三类,纵坐标分成四类,然后 facetRectencode x 绑定横坐标分类,比如 分类一,分类二, 分类三encode y 绑定纵坐标分类。

可以参考 https://g2.antv.antgroup.com/examples/composition/facet/#rect-bar

「水平日历色块图」中月末周的分割线如何使用 v5 api 实现?

cell 底层是 rect 图形,无法单独设置某条边的颜色,还是需要自定义形状,覆盖类似 line 的图形才能实现
参考 https://github.com/antvis/G2/blob/master/examples/heatmap/calendar/demo/calendar-horizontal.ts

@coveralls
Copy link

Pull Request Test Coverage Report for Build 14818772077

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 43 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.08%) to 86.669%

Files with Coverage Reduction New Missed Lines %
src/interaction/elementSelect.ts 3 89.3%
src/interaction/tooltip.ts 5 91.3%
src/interaction/elementHighlight.ts 7 84.42%
src/interaction/treemapDrillDown.ts 10 31.25%
src/interaction/utils.ts 18 89.93%
Totals Coverage Status
Change from base Build 14463832267: -0.08%
Covered Lines: 10762
Relevant Lines: 12025

💛 - Coveralls

@bingling-sama bingling-sama marked this pull request as draft May 7, 2025 03:00
@interstellarmt interstellarmt added the OSCP AntV Open Source Contribution Plan label May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OSCP AntV Open Source Contribution Plan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants