We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
使用 render spec 用法时,目前需要增加 type: 'view' 的节点,期望可以增加语法糖,简化用法
type: 'view'
render({ type: 'view', children: [{ type: 'line', encode: {}, style: {}, }] })
render({ type: 'line', encode: {}, style: {}, })
The text was updated successfully, but these errors were encountered:
现在应该支持:https://github.com/antvis/G2/blob/v5/__tests__/integration/charts/aapl-line-basic.ts
Sorry, something went wrong.
import { render } from '@antv/g2'; function Composite({ data, encode }) { return () => { return [{ type: 'line', data, encode }, { type: 'point', data, encode: { ...encode, shape: 'point' } }] } } Composite.props = { composite: true } const c1 = render({ type: Composite, height: 200, data: [{ type: '分类1', value: 10 }, { type: '分类2', value: 12 }], encode: { x: 'type', y: 'value' } }); const c2 = render({ type: 'view', height: 200, children: [{ type: Composite, data: [{ type: '分类1', value: 10 }, { type: '分类2', value: 12 }], encode: { x: 'type', y: 'value' } }] }); document.getElementById('container').replaceChildren(c1, c2);
控制台有报错
大概2月份重构的时候会解决这个问题
Successfully merging a pull request may close this issue.
现状
使用 render spec 用法时,目前需要增加
type: 'view'
的节点,期望可以增加语法糖,简化用法期望
The text was updated successfully, but these errors were encountered: