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
https://g2.antv.vision/zh/examples/heatmap/basic#basic
必现。希望数据不正常时显示指定的颜色。
The text was updated successfully, but these errors were encountered:
没有数据,就不渲染,目前是空(透明)。如果要做默认逻辑,那么可以在 color 中进行回调,对于空数据设置对应自己的默认颜色。
Sorry, something went wrong.
目前可以用两个 view 解决。
const v0 = chart.createView(); v0.data(source); v0 .polygon() .position('name*day') .color('sales', '#BAE7FF-#1890FF-#0050B3') .label('sales', { offset: -2, style: { fill: '#fff', shadowBlur: 2, shadowColor: 'rgba(0, 0, 0, .45)', }, }) .style({ lineWidth: 1, stroke: '#fff', }); // 空数据绘制在另一个 view const v1 = chart.createView(); v1.data([{ name: 0, day: 1, sales: 0, }]); v1 .polygon() .position('name*day') .color('sales', 'red') .style({ lineWidth: 1, stroke: '#fff', });
No branches or pull requests
Reproduction link
https://g2.antv.vision/zh/examples/heatmap/basic#basic
Steps to reproduce
必现。希望数据不正常时显示指定的颜色。
The text was updated successfully, but these errors were encountered: