Skip to content

Distribute axes evenly #15498

@aweibell

Description

@aweibell

What problem does this feature solve?

When positioning a yAxis, one can set position left/right and offse (in pixels?). If none of these are set, and multiple axes added, the axes should be evenly distributed along the xAxis of the chart. It may be preferable to let position get two new options: 'inside', which distributes axes inside the chart, or 'outside', which distributes outside the plot area, ensuring that names and labels don't interfere with each other.

An alternative solution, of lower value, but still better than the existing options, could be to allow the use of percentage values in offset instead of pixels.

Example of using current features

Here I've put the y values in axis names instead of showing the axisLines. Using offsets in steps of -100 as I don't know the size of the chart area. Eventually they interfere, as can be seen in the upper right.
echarts_multiple_yaxes

What does the proposed API look like?

yAxis: [
  {
    position: 'inside',
    axisLine: { show: false }
    ...
  },
series: [{ yAxisIndex: 0, ... }]
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enThis issue is in EnglishstaleInactive for a long time. Will be closed in 7 days.supportwaiting-for: community

    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