如何在Sencha ExtJS图表中反转轴?

编程入门 行业动态 更新时间:2024-10-09 11:19:18
本文介绍了如何在Sencha ExtJS图表中反转轴?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个折线图,其中x轴为数字,y轴为数字。我希望将y轴反转,以便较高的值在轴的底部,较低的值在顶部。我看了看API Docu,没有找到使轴反转的配置。有任何线索吗?

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?

推荐答案

在ExtJS 3中,有一个反向配置选项可以解决这个问题。使用ExtJS 4,您必须使用变通方法。

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

要还原x轴值,可以使用连接到图表的商店的sorters属性。

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

但是要还原y轴,您必须转换值。以下是有关如何实现此目的的示例: www.sencha/forum/showthread.php?132148-What-has-happen-to-quot-reverse- quot-config-on-chart-axes& p = 949699& viewfull = 1#post949699

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

更多推荐

如何在Sencha ExtJS图表中反转轴?

本文发布于:2023-07-19 13:40:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1157062.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:转轴   图表   如何在   ExtJS   Sencha

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!