Skip to content

Axis的类目轴的boundaryGap优化 #12230

@fxxjdedd

Description

@fxxjdedd

What problem does this feature solve?

类目轴的boundaryGap只能为true/false,为true的时候会在两侧留出一定空白,但这个空白的宽度用户无法指定。

What does the proposed API look like?

希望能暴露一个配置来让用户指定这个空白的宽度。

src/coord/Axis.js

function fixExtentWithBands(extent, nTick) {
    var size = extent[1] - extent[0];
    var len = nTick;
    var margin = size / len / 2;
    extent[0]  = margin;
    extent[1] -= margin;
}

即这里的margin可以让用户指定。

Metadata

Metadata

Assignees

No one assigned

    Labels

    new-featurestaleInactive for a long time. Will be closed in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions