Skip to content

index in axisLabel’s formatter doesn't work as expected when "inverse=true" #13912

@CrotchBurnt

Description

@CrotchBurnt

Version

4.4.0

Steps to reproduce

横向柱状图设置如此:
axisLabel: { formatter: function(value, index) { switch (index) { case 0: return '{a|} ' value break case 1: return '{b|} ' value break case 2: return '{c|} ' value break default: return value } } }

What is expected?

Whenever there's "inverse=true", the first three of data should be styled

What is actually happening?

The first three are styled before the inversion.


inverse=true的时候,formatter的index还是按照原始数据的顺序来的,导致我不能按真实的显示顺序给前三位标记样式。
或者有其他的实现方法吗?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmissing-demoThe author should provide a demo.pendingWe are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions