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

极坐标系自动调整大小 #5048

Closed
pearmini opened this issue May 18, 2023 · 4 comments · May be fixed by antvis/coord#43
Closed

极坐标系自动调整大小 #5048

pearmini opened this issue May 18, 2023 · 4 comments · May be fixed by antvis/coord#43

Comments

@pearmini
Copy link
Member

pearmini commented May 18, 2023

  • 问题:仪表盘没有充满图表
  • 出现原因:非完整的几坐标系没有调整大小
  • 实现思路:对于 polar 等 radial 坐标系,transform 里面计算角度,然后增加一个 scale 变换。
  • 版本:5.0.7
export function gaugeCustomColor(): G2Spec {
  return {
    type: 'gauge',
    data: {
      value: {
        target: 120,
        total: 400,
        name: 'score',
        thresholds: [100, 200, 400],
      },
    },
    scale: {
      color: {
        range: ['#F4664A', '#FAAD14', 'green'],
      },
    },
  };
}
@hustcc
Copy link
Member

hustcc commented May 19, 2023

image
image
image
image
image
image

@pearmini
Copy link
Member Author

相同问题:#6118

@hustcc
Copy link
Member

hustcc commented Jul 25, 2024

@pearmini 这个问题之前做了一半,coordinate 的 revert 没有办法处理,看看是否能解决。

@pearmini
Copy link
Member Author

@hustcc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants