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

refactor(mark): inline shape and infer transform #5386

Merged
merged 1 commit into from
Aug 11, 2023
Merged

Conversation

pearmini
Copy link
Member

@pearmini pearmini commented Aug 10, 2023

Refactor Mark

为了未来满足如下的写法:

import { Runtime, Interval, createCorelib, extend } from '@antv/g2';

const Chart = extend(Runtime, { ...createCorelib(), 'mark.interval': Interval });

const chart = new Chart();

chart.interval().data(data).encode('x', 'name').encode('y', 'value');

chart.render();
  • 将 mark 的 shape 和 infer transform(Maybe 开头的 transform) 对应的组件直接放入了 mark。
  • stdlib 去掉了 shape(label shape 还是保存着) 和 infer transform。

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5819464364

  • 127 of 127 (100.0%) changed or added relevant lines in 27 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 89.409%

Totals Coverage Status
Change from base Build 5806672521: 0.03%
Covered Lines: 9603
Relevant Lines: 10401

💛 - Coveralls

@pearmini pearmini merged commit 40cc5b6 into v5 Aug 11, 2023
@pearmini pearmini deleted the refactor-mark branch August 11, 2023 02:14
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