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://observablehq.com/@d3/bar-chart */ import { Chart } from '@antv/g2'; const chart = new Chart({ container: 'container', autoFit: true, }); const uvBillData = [ { time: '2019-03', value: 350, type: 'uv' }, { time: '2019-04', value: 900, type: 'uv' }, { time: '2019-05', value: 300, type: 'uv' }, { time: '2019-06', value: 450, type: 'uv' }, { time: '2019-07', value: 470, type: 'uv' }, { time: '2019-03', value: 220, type: 'bill' }, { time: '2019-04', value: 300, type: 'bill' }, { time: '2019-05', value: 250, type: 'bill' }, { time: '2019-06', value: 220, type: 'bill' }, { time: '2019-07', value: 362, type: 'bill' }, ]; const transformData = [ { time: '2019-03', count: 800 }, { time: '2019-04', count: 600 }, { time: '2019-05', count: 400 }, { time: '2019-06', count: 380 }, { time: '2019-07', count: 220 }, ]; chart .interval() .data(uvBillData) .encode('x', 'time') .encode('y', 'value') .encode('color', 'type') .transform([{ type: 'dodgeX' }]) .axis('y', { labelFormatter: '.0%' }); chart .line() .data(transformData) .encode('x', 'time') .encode('y', 'count') .encode('color', () => 'line') .axis('y', { labelFormatter: '.0%' }); chart.render();
The text was updated successfully, but these errors were encountered:
相同的问题:#5250
Sorry, something went wrong.
这个问题我深入看看
Successfully merging a pull request may close this issue.
The text was updated successfully, but these errors were encountered: