Skip to content

🤔 [QUESTION] 仪表盘如何显示指定的刻度 ? #3462

Closed

Description

@xiecg

🏞 实现下面图片的效果,文档没找到相关的配置

image

Activity

  1. added
    Question
    on Feb 8, 2023
  2. zhangzhonghe commented on Feb 8, 2023

    @zhangzhonghe
    Member

    @xiecg 试一下下面这个配置项。

    image

  3. xiecg commented on Feb 8, 2023

    @xiecg
    Author

    @xiecg 试一下下面这个配置项。

    image

    不行,tickLine 出现的位置被固定了(0, 20, 40, 60, 80, 100),我希望有配置可以指定出现的位置。

  4. hustcc commented on May 23, 2023

    @hustcc
    Member

    自定义 tickMethod 即可,返回你想显示的值。

    axis: {
      label: {
        formatter(v) {
          return Number(v) * 100;
        },
      },
      tickMethod: () => [0.5, 0.7], // 👈🏻
    },

    image

  5. locked and limited conversation to collaborators on May 23, 2023
  6. converted this issue into a discussion #3580 on May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions