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
异常 DEMO
基于 sample 拆分为两条线,绘制形状为 hvh ,上色规则与多色折线图一致
sample
hvh
import { Chart } from '@antv/g2'; const data = [ { sample: 's1', date: 1, value: 2, condition: 'CLR' }, { sample: 's1', date: 2, value: 3, condition: 'CLR' }, { sample: 's1', date: 3, value: 4, condition: 'VV' }, { sample: 's1', date: 4, value: 5, condition: 'VV' }, { sample: 's1', date: 5, value: 4, condition: 'CLR' }, { sample: 's1', date: 6, value: 3, condition: 'CLR' }, { sample: 's2', date: 1, value: 3, condition: 'CLR' }, { sample: 's2', date: 2, value: 2, condition: 'VV' }, { sample: 's2', date: 3, value: 1, condition: 'VV' }, { sample: 's2', date: 4, value: 0, condition: 'VV' }, { sample: 's2', date: 5, value: 1, condition: 'CLR' }, { sample: 's2', date: 6, value: 2, condition: 'CLR' }, ]; const chart = new Chart({ container: 'container', autoFit: true }); chart .line() .data(data) .scale('y', { nice: true }) .scale('color', { domain: ['CLR', 'VV '], range: ['deepskyblue', '#666666'] }) .encode('x', 'date') .encode('y', 'value') .encode('shape', 'hvh') .encode('color', 'condition') .encode('series', 'sample') // trouble spot .style('gradient', 'x') .style('lineWidth', 2) .axis('x', { title: 'date' }); chart.render();
The text was updated successfully, but these errors were encountered:
pearmini
Successfully merging a pull request may close this issue.
异常 DEMO
期望效果
基于
sample
拆分为两条线,绘制形状为hvh
,上色规则与多色折线图一致现有问题
The text was updated successfully, but these errors were encountered: