Skip to content

chart.axis() 中 grid 回调函数返回 null 时无效,网格线仍然绘制 #437

Closed
@simaQ

Description

  • F2 Version: 3.3.1
  • Platform:
  • Mini Showcase(like screenshots):
  • CodePen Link:

将官网 demo: https://antv.alipay.com/zh-cn/f2/3.x/demo/radar/line.html 中相关代码替换为:

chart.axis('score', {
  label: function label(text, index, total) {
    if (index === total - 1) {
      return null;
    }
    return {
      top: true
    };
  },
  grid(text) {
    if (text === '40') {
        return {
           type: 'arc',
          lineDash: null,
          stroke: 'red'
        }
    }
    return null;
  }
});

image

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions