antvis/G2
The issue has been closed
[BUG] view下regionFilter失效 #2481
liuxuan1-1 posted onGitHub
版本: 4.0.7
chart.data(chartData.data);
chart
.area()
.position('日期*汇总实际每日达成')
.color(`l(90) 0:${COLOR.budgetGraphBlue} 1:#ffffff`);
chart.annotation().regionFilter({
top: true,
start: ['4.6', 'max'],
end: ['4.8', 0],
color: `l(90) 0:${COLOR.budgetGraphPink} 1:#ffffff`,
});
这样正常
const areaView = chart.createView();
areaView.data(chartData.data);
areaView
.area()
.position('日期*汇总实际每日达成')
.color(`l(90) 0:${COLOR.budgetGraphBlue} 1:#ffffff`);
areaView.annotation().regionFilter({
top: true,
start: ['4.6', 'max'],
end: ['4.8', 0],
color: `l(90) 0:${COLOR.budgetGraphPink} 1:#ffffff`,
});
写在view中失效