How to reverse an Axis in Sencha ExtJS Charts?

╄→гoц情女王★ 提交于 2019-12-11 07:28:49

问题


I have a line chart with x Axis being numeric and y axis being numeric as well. I want the y axis to be reversed so that higher values are at the bottom of the axis and lower values at the top. I looked at the API Docu and didnt find a config to reverse the axis or so. Any clues?


回答1:


In ExtJS 3 there was a reverse config option to get this going. With ExtJS 4 you have to use workarounds.

For reverting the x axis values you could use the sorters property of the store connected to the chart.

But for reverting the y axis you have to convert your values. Here's a sample on how to achieve this: http://www.sencha.com/forum/showthread.php?132148-What-has-happen-to-quot-reverse-quot-config-on-chart-axes&p=949699&viewfull=1#post949699



来源:https://stackoverflow.com/questions/28541386/how-to-reverse-an-axis-in-sencha-extjs-charts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!