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 F2 from '@antv/f2';
const data = [ [ 0, 0, 10 ], [ 0, 0, 19 ],
此处坐标一直,但是在图表中只能显示最后的颜色,怎么才能将两种颜色叠加 ]; const source = []; for (let i = 0; i < data.length; i++) { const item = data[i]; const obj = {}; obj.name = item[0]; obj.day = item[1]; obj.sales = item[2]; source.push(obj); } const chart = new F2.Chart({ id: 'container', pixelRatio: window.devicePixelRatio }); chart.source(source, { name: { type: 'cat', values: [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J' ] }, day: { type: 'cat', values: [ 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.' ] } });
chart.polygon() .position('name*day') .color('sales', '#BAE7FF-#1890FF-#0050B3') .style({ lineWidth: 1, stroke: '#fff' }) .animate({ appear: { animation: 'fadeIn', duration: 800 } }); chart.render();
The text was updated successfully, but these errors were encountered:
用 https://stackblitz.com/edit/react-8wai9s?file=index.js 构建一个demo看看
Sorry, something went wrong.
No branches or pull requests
import F2 from '@antv/f2';
const data = [
[ 0, 0, 10 ],
[ 0, 0, 19 ],
此处坐标一直,但是在图表中只能显示最后的颜色,怎么才能将两种颜色叠加
];
const source = [];
for (let i = 0; i < data.length; i++) {
const item = data[i];
const obj = {};
obj.name = item[0];
obj.day = item[1];
obj.sales = item[2];
source.push(obj);
}
const chart = new F2.Chart({
id: 'container',
pixelRatio: window.devicePixelRatio
});
chart.source(source, {
name: {
type: 'cat',
values: [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J' ]
},
day: {
type: 'cat',
values: [ 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.' ]
}
});
chart.polygon()
.position('name*day')
.color('sales', '#BAE7FF-#1890FF-#0050B3')
.style({
lineWidth: 1,
stroke: '#fff'
})
.animate({
appear: {
animation: 'fadeIn',
duration: 800
}
});
chart.render();
The text was updated successfully, but these errors were encountered: