gpt4 book ai didi

apache-flex - 删除布局中的 Flex Chart AxisRenderer?

转载 作者:行者123 更新时间:2023-12-02 01:10:30 25 4
gpt4 key购买 nike

我试图在 Flex 中隐藏垂直轴和水平轴渲染器,这样我就可以在没有它们的情况下拍摄图表的照片。

我已将两个渲染设置为visible = false 和includeInLayout = false。他们没有出现,但仍然占据空间。我尝试将宽度/高度设置为 0,但这也没有帮助。

        <mx:horizontalAxisRenderers>
<mx:AxisRenderer
id="horizontalAxisRenderer"
axis="{dtAxis}"
axisStroke="{axis}"
placement="bottom"
minorTickPlacement="outside"
minorTickLength="10"
tickLength="12"
tickPlacement="outside"
color="0x707275"
styleName="axisStyle"
visible="false"
includeInLayout="false"
>
<mx:tickStroke>{ticks}</mx:tickStroke>
<mx:minorTickStroke>{mticks}</mx:minorTickStroke>
</mx:AxisRenderer>
</mx:horizontalAxisRenderers>

<mx:verticalAxisRenderers>
<mx:AxisRenderer
id="verticalAxisRenderer"
axis="{laMain}"
axisStroke="{axis}"
placement="bottom"
minorTickPlacement="outside"
minorTickLength="10"
tickLength="12"
tickPlacement="outside"
fontSize="15"
color="0x707275"
labelGap="0"
styleName="axisStyle"
visible="false"
includeInLayout="false"
>
<mx:tickStroke>{ticks}</mx:tickStroke>
<mx:minorTickStroke>{mticks}</mx:minorTickStroke>
</mx:AxisRenderer>
</mx:verticalAxisRenderers>

最佳答案

类似的问题was asked here ,并以 this answer 为基础我能够找到成功。尝试如下操作,根据需要将轴类型从 LinearAxis 调整为您可能使用的任何类型:

  <mx:horizontalAxis>
<mx:LinearAxis id="myXAxis" />
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
<mx:AxisRenderer axis="{myXAxis}"
minorTickPlacement="none"
tickPlacement="none"
labelGap="0"
showLabels="false" showLine="false"
visible="false" includeInLayout="false" />
</mx:horizontalAxisRenderers>

我仍然需要保持渲染器和轴之间的绑定(bind)。没有它,应用程序似乎根本不想加载。

关于apache-flex - 删除布局中的 Flex Chart AxisRenderer?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5364568/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com