Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Axis tick auto align on multiaxis #10928

Closed
pooch-tonic opened this issue Jul 26, 2019 · 7 comments
Closed

Axis tick auto align on multiaxis #10928

pooch-tonic opened this issue Jul 26, 2019 · 7 comments
Labels
difficulty: hard Issues that may take longer time to be fixed than the average. en This issue is in English enhancement priority: high topic: axis
Milestone

Comments

@pooch-tonic
Copy link

pooch-tonic commented Jul 26, 2019

What problem does this feature solve?

I want to have a functionality which allows the user to have the same number of ticks on every parallel axis.

i.e. I have 2 yAxis, but the auto ticks calculation gives me 6 ticks for one axis and 5 for the other. The difference creates irregular spacings between the split lines, which is not really good for user experience.

Here is the sample option code:

option = {
  "xAxis": [
    {
      "data": ["test"]
    }
  ],
  "yAxis": [
    {
      "name": "A",
    },
    {
      "name": "B",
    }
  ],
  "series": [
    {
      "name": "A",
      "type": "bar",
      "data": [
        275500000,
      ],
      "yAxisIndex": 0
    },
    {
      "name": "B",
      "type": "bar",
      "data": [
        2289000000
      ],
      "yAxisIndex": 1
    },
  ]
}

And here is the sample result:
ECharts-tick-Align.jpg

My request is based on the HighCharts library, which provides an API called alignTicks, which does the same thing as I described here.

What does the proposed API look like?

Let's say we have a boolean attribute yAxis.axisAutoAlign. By setting it to true, its ticks will get aligned with every other axis in the yAxis array which has the same boolean to true. That way, if one of the axis has 6 ticks, all the other axis will also have 6 ticks and get nicely aligned altogether.

@echarts-bot
Copy link

echarts-bot bot commented Jul 26, 2019

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added en This issue is in English new-feature pending We are not sure about whether this is a bug/new feature. waiting-for-help labels Jul 26, 2019
@Ovilia Ovilia added enhancement FAQ and removed new-feature pending We are not sure about whether this is a bug/new feature. waiting-for-help labels Jul 29, 2019
@ThomasKientz
Copy link

Much needed !

@Ovilia Ovilia added priority: high and removed FAQ labels Aug 29, 2019
@Ovilia Ovilia added this to the 4.5.0 milestone Sep 4, 2019
@Ovilia
Copy link
Contributor

Ovilia commented Sep 24, 2019

This is an important feature and we should have some further discussion about it. Probably it's not easy to implement this and may be done in v5.0.

@Ovilia Ovilia added the difficulty: hard Issues that may take longer time to be fixed than the average. label Sep 24, 2019
@Ovilia Ovilia modified the milestones: 4.5.0, 5.0.0 Sep 24, 2019
@tadeubas
Copy link

I need this feature too!

@tidemarks
Copy link

这个问题是不是短期内不会处理了?

@susiwen8
Copy link
Contributor

@tidemarks 这个改动影响面很大,需要很多验证,所以短期不会合入。

@liho98
Copy link

liho98 commented Aug 3, 2021

@tidemarks 这个改动影响面很大,需要很多验证,所以短期不会合入。

这个issue开了3年了,你指的短期是多少年呢?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: hard Issues that may take longer time to be fixed than the average. en This issue is in English enhancement priority: high topic: axis
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants