antv V5.2.2 面积图area内置 shape 图形设置无效 #6581
Eomnational posted onGitHub
问题描述
antv V5.2.2 面积图area内置 shape 图形设置除了area之外的选项设置无效 /**
- A recreation of this demo: https://vega.github.io/vega-lite/examples/area_gradient.html
- / import { Chart } from '@antv/g2';
const chart = new Chart({ container: 'container', autoFit: true, });
chart.data({ type: 'fetch', value: 'https://assets.antv.antgroup.com/g2/stocks.json', transform: [ { type: 'filter', callback: (d) => d.symbol === 'GOOG', }, ], });
chart .smooth() .encode('x', (d) => new Date(d.date)) .encode('y', 'price') .style('fill', 'linear-gradient(-90deg, rgba(24,144,255,.1) 0%, rgba(24,144,255,.25) 100%)');
chart .line() .encode('x', (d) => new Date(d.date)) .encode('y', 'price') .style('stroke', 'rgba(24,144,255,.90)') .style('lineWidth', 2);
chart.render(); <img width="960" alt="企业微信截图_17363011989759" src="https://github.com/user-attachments/assets/06e2d8a7-e38c-4d28-8bbf-cd430346dd4a" /> <img width="833" alt="企业微信截图_17363012181724" src="https://github.com/user-attachments/assets/5f2de49e-90bc-4950-b7bc-ffb0319b9e00" />
重现链接
No response
重现步骤
No response
预期行为
可以绘制平滑曲线的面积图
平台
No response
屏幕截图或视频(可选)
No response
补充说明(可选)
No response