是否可以隐藏弹性图表的轴并且不占用任何空间? [英] Is it possible to hide the axis of a flex chart and have it not take up any space?

查看:135
本文介绍了是否可以隐藏弹性图表的轴并且不占用任何空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有可能告诉flex显示没有可见轴的图表吗?我想让图表的内容占用所有可用空间。我可以将AxisRenderer的可见性设置为false,这将隐藏轴,但会留下轴通常为空的空间。如何删除此空白空间?

Is it possible to tell flex to display a chart with no visible axis? I want the contents of the chart to take up all the available space. I can set the visibility on the AxisRenderer to false which will hide the axis but that leaves an empty space where the axis would usually be. How can I remove this empty space?

   <mx:horizontalAxis>
      <mx:DateTimeAxis id="xAxis" dataUnits="hours" />
   </mx:horizontalAxis>
   <mx:horizontalAxisRenderers>
      <mx:AxisRenderer axis="{xAxis}" visible="false" height="0" />
   </mx:horizontalAxisRenderers>

我已经尝试在渲染器上设置高度,但没有效果,

I've tried setting the height on the renderer but that has no effect, and there is no height style on the axis itself.

推荐答案

这适用于所有flex组件 - visible ='false' / code>使它们从视图中消失。但他们实际上仍然在那里,没有被画,但发生。还有一个名为 includeInLayout 的第二个参数,当设置为false时,使它们停止发生。

This goes for all flex components - visible='false' makes them disappear from the view. But they are actually still there, not being drawn, but taking place. There's a second parameter called includeInLayout which, when set to false, makes them stop taking place.

这篇关于是否可以隐藏弹性图表的轴并且不占用任何空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆