fisheye

鱼眼坐标系变换对输入的维度应用笛卡尔鱼眼效果。

开始使用

fisheye-scatter
import { Chart } from '@antv/g2';
const chart = new Chart();
chart.coordinate({
transform: [{ type: 'fisheye', focusX: 0.5, focusY: 0.5 }],
});
chart
.point()
.data({
type: 'fetch',
value: 'https://gw.alipayobjects.com/os/antvdemo/assets/data/bubble.json',
})
.encode('x', 'GDP')
.encode('y', 'LifeExpectancy')
.encode('size', 'Population')
.encode('color', 'continent')
.encode('shape', 'point')
.style('fillOpacity', 0.3)
.style('lineWidth', 1)
.scale('size', {
type: 'log',
range: [4, 20],
});
chart.render();

选项

参数说明类型默认值
focusX鱼眼变换中心点 x 方向位置number0
focusY鱼眼变换中心点 y 方向位置number0
distortionX鱼眼变换 x 方向畸变大小number2
distortionY鱼眼变换 y 方向畸变大小number2
visualfocusX 和 focusY 的值是否是视觉坐标点booleanfalse
Previous
overview
Next
parallel