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: add heatmap mark and shape #5047

Merged
merged 13 commits into from
May 25, 2023
Merged

feat: add heatmap mark and shape #5047

merged 13 commits into from
May 25, 2023

Conversation

hustcc
Copy link
Member

@hustcc hustcc commented May 18, 2023

fixed #5037

  • heatmap mark and shape
  • tests
  • demo
  • document
  • performance
image image image

参考:

使用

chart
  .heatmap()
  .encode('x', 'x')
  .encode('y', 'y')
  .encode('color', 'value')
  .style('gradient', '');

@hustcc hustcc changed the title feat: add heatmap mark and shape WIP feat: add heatmap mark and shape May 18, 2023
@hustcc hustcc changed the title WIP feat: add heatmap mark and shape feat: add heatmap mark and shape May 18, 2023
@pearmini
Copy link
Member

pearmini commented May 18, 2023

可以参考 plot 的 raster mark:https://observablehq.com/plot/marks/raster ,并且在测试里面添加里面的几个例子(4.0 的例子不太美观)?

@pearmini
Copy link
Member

pearmini commented May 18, 2023

建议改名成 raster,plot(如上)和 ggplot: https://ggplot2.tidyverse.org/reference/geom_tile.html#ref-examples 都是叫 raster。

image

当然 heatmap 应该也行?(我不确定是否专业)

@hustcc
Copy link
Member Author

hustcc commented May 18, 2023

可以参考 plot 的 raster mark:https://observablehq.com/plot/marks/raster ,并且在测试里面添加里面的几个例子(4.0 的例子不太美观)?

可以的,正好找不到素材。

@xiaoiver
Copy link
Contributor

在 G2Context 中增加了 createCanvas,这样在服务端渲染时类似 heatmap 可以用它创建类 <canvas> 元素绘制。

antvis/G#1344

@hustcc hustcc requested a review from pearmini May 24, 2023 09:52
package.json Show resolved Hide resolved
__tests__/plots/static/diamond-heatmap-density.ts Outdated Show resolved Hide resolved
__tests__/plots/static/heatmap-heatmap-basic.ts Outdated Show resolved Hide resolved
src/api/mark/index.ts Show resolved Hide resolved
@hustcc hustcc merged commit 67d88f4 into v5 May 25, 2023
@hustcc hustcc deleted the feat-heatmap branch May 25, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

【特性】图表类型支持:密度热力图
3 participants