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

echart3中设置了xAxis.axisLabel.rotate以后,明明可以完整显示的刻度却由于interval而间隔显示了 #4170

Closed
jayfansdongdong opened this issue Sep 29, 2016 · 2 comments

Comments

@jayfansdongdong
Copy link

问题简述 (One-line summary)

当xAxis->axisLabel->interval为auto时,由于label长度过长会导致间隔显示。为了尽量显示所有Label,我们设置了xAxis->axisLabel->rotate。在echarts2里可以完美显示,echarts3里则不起作用。

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version): 3.2.3 VS 2.2.7
  • 浏览器类型和版本 (Browser version): chrome
  • 操作系统类型和版本 (OS Version): WIN10 、 OS

重现步骤 (Steps to reproduce)

升级echarts 2 ->3

期望结果 (Expected behaviour)

升级为echarts3以后显示如下:
image

期望显示和echarts2里面一样:
image

可能哪里有问题 (What went wrong)

当xAxis->axisLabel->interval 设置为true时,期望能最大限度显示所有刻度文字。
当xAxis->axisLabel->rotate 设置一定角度旋转后,原本水平距离不够显示的文字,应该能够显示出来。
在echarts2里面,貌似是先旋转,再计算能不能显示完全。而echarts3里面则变成了先按照文字水平放置的宽度计算,然后再旋转,导致echarts2里面显示的刻度文字远远多于echarts3里面的。

@241382976
Copy link

遇到同样的问题,求大神解决

@100pah 100pah closed this as completed in 53e28bd Nov 5, 2017
100pah added a commit that referenced this issue Nov 5, 2017
@18262282746
Copy link

interval设为0就行,看API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants