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
import { Mix } from '@antv/g2plot';
const data = [ { year: '1991', value: 3, category: '销量' }, { year: '1992', value: 4, category: '销量' }, { year: '1991', value: 2, category: '利润' }, { year: '1992', value: 3, category: '利润' }, ];
const mixPlot = new Mix('container', { appendPadding: 8, data, plots: [ { type: 'column', options: { data: data.filter((d) => d.category === '销量'), xField: 'year', yField: 'value', seriesField: 'category', }, }, { type: 'line', options: { data: data.filter((d) => d.category === '利润'), xField: 'year', yField: 'value', seriesField: 'category', }, }, ], legend: {} });
mixPlot.render();
The text was updated successfully, but these errors were encountered:
使用不同的seriesField,显示两个图例又会不同行,也无法控制图例样式
Sorry, something went wrong.
No branches or pull requests
import { Mix } from '@antv/g2plot';
const data = [
{ year: '1991', value: 3, category: '销量' },
{ year: '1992', value: 4, category: '销量' },
{ year: '1991', value: 2, category: '利润' },
{ year: '1992', value: 3, category: '利润' },
];
const mixPlot = new Mix('container', {
appendPadding: 8,
data,
plots: [
{
type: 'column',
options: {
data: data.filter((d) => d.category === '销量'),
xField: 'year',
yField: 'value',
seriesField: 'category',
},
},
{
type: 'line',
options: {
data: data.filter((d) => d.category === '利润'),
xField: 'year',
yField: 'value',
seriesField: 'category',
},
},
],
legend: {}
});
mixPlot.render();
The text was updated successfully, but these errors were encountered: