Incubator-echarts: 如何让echarts横坐标最后一个坐标强制显示,其他的坐标自动显示

Created on 8 May 2017  ·  5Comments  ·  Source: apache/incubator-echarts

One-line summary [问题简述]

现版本的echarts只是强制显示了第一个横坐标值,其他的坐标轴自动适应显示,但很多情况下需要显示最后一个坐标值,请问有办法吗?

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:3.X
  • Browser version [浏览器类型和版本]:chrome
  • OS Version [操作系统类型和版本]:win7

Expected behaviour [期望结果]

第一个横坐标值与最后一个横坐标值强制显示,其他的自适应

ECharts option [ECharts配置项]


option = {

}

Other comments [其他信息]


stale

Most helpful comment

axisLabel: {
showMaxLabel: true
}

All 5 comments

这个方法有个问题,我想要interval是auto的并且显示最后一个值。因为我会通过参数显示不同天数的数据(可能7天,可能一年),并且我的chart是全屏的,auto的话会根据屏幕大小自动缩放(这时间隔会自动重新计算),这个时候我怎样能让他一直显示最后一天的值?

这边也有楼上这个需求

axisLabel: {
showMaxLabel: true
}

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings