密度热力图
示例加载中…
import { Chart } from '@antv/g2';
const chart = new Chart({
container: 'container',
autoFit: true,
padding: 0,
});
chart.options({
type: 'view',
axis: false,
children: [
{
type: 'image',
style: {
src: 'https://gw.alipayobjects.com/zos/rmsportal/NeUTMwKtPcPxIFNTWZOZ.png',
x: '50%',
y: '50%',
width: '100%',
height: '100%',
},
tooltip: false,
},
{
type: 'heatmap',
data: {
type: 'fetch',
value: 'https://assets.antv.antgroup.com/g2/heatmap.json',
},
encode: { x: 'g', y: 'l', color: 'tmp' },
style: { opacity: 0 },
tooltip: false,
},
],
});
chart.render();