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
/** * A recreation of this demo: https://vega.github.io/vega-lite/examples/bar_grouped_repeated.html */ import { Chart } from '@antv/g2'; const chart = new Chart({ container: 'container', theme: 'classic', autoFit: true, paddingBottom: 150, }); chart.data({ type: 'fetch', value: 'https://assets.antv.antgroup.com/g2/movies.json', }); chart .interval() .transform({ type: 'groupX', y: 'sum' }) .axis('y', { labelFormatter: '~s' }) .axis('x', { labelTransform: 'rotate(90)' }) .encode('x', 'Major Genre') .encode('y', 'Worldwide Gross') .encode('series', () => 'Worldwide Gross') .encode('color', () => 'Worldwide Gross') .tooltip({ channel: 'y', valueFormatter: '~s' }); chart .interval() .transform({ type: 'groupX', y: 'sum' }) .encode('x', 'Major Genre') .encode('y', 'US Gross') .encode('color', () => 'US Gross') .encode('series', () => 'US Gross') .tooltip({ channel: 'y', valueFormatter: '~s' }); // 1. 期望是转换之后的数据,目前是转换之前的数据。 // 2. 除了 data 之外,返回 channel 的信息,可以识别条属于哪一个度量。 chart.on('element:click', e => expect(e.data.data).toBeTransformedData()); chart.render();
The text was updated successfully, but these errors were encountered:
可以通过数据列实现,故关闭。
Sorry, something went wrong.
pearmini
No branches or pull requests
The text was updated successfully, but these errors were encountered: