antvis/G2





The issue has been closed
legend marker 默认 shape 不符合 #4847
pearmini posted onGitHub
测试案例在这:__tests__/plots/static/score-by-item-area-radar.ts
<img src="https://user-images.githubusercontent.com/49330279/228446110-0f213523-89ca-4507-9594-9beb987a4588.png" width=640 />
import { G2Spec } from '../../../src';
import { scoreByItem } from '../../data/score-by-item';
export function scoreByItemAreaRadar(): G2Spec {
return {
type: 'view',
data: scoreByItem,
coordinate: { type: 'polar' },
axis: {
x: { grid: true },
y: { zIndex: 1, title: false, direction: 'center' },
},
scale: {
x: { padding: 0.5, align: 0 },
y: { tickCount: 5 },
},
legend: { color: { layout: { justifyContent: 'flex-start' } } },
children: [
{
type: 'area',
encode: { x: 'item', y: 'score', color: 'type' },
style: { fillOpacity: 0.5 },
},
{
type: 'line',
encode: { x: 'item', y: 'score', color: 'type' },
style: { lineWidth: 2 },
},
],
};
}