Skip to content
New issue

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

极坐标系 auto Inset? #5049

Closed
pearmini opened this issue May 18, 2023 · 0 comments · Fixed by #5204
Closed

极坐标系 auto Inset? #5049

pearmini opened this issue May 18, 2023 · 0 comments · Fixed by #5204
Assignees
Labels

Comments

@pearmini
Copy link
Member

  • 问题:极坐标系的 axis label 可能和图例重合
  • 解决办法:auto Inset 计算一下 inset?
  • 版本:5.0.7
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 },
      },
    ],
  };
}
@pearmini pearmini self-assigned this May 18, 2023
@pearmini pearmini added the V5 label May 18, 2023
@pearmini pearmini linked a pull request Jun 19, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant