【发布时间】:2011-03-22 10:43:58
【问题描述】:
基于此 Adobe 多轴图表示例:http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_12.html
然后我将一些数据值更改为负数,我的轴不再对齐。
有人知道如何对齐垂直轴吗?这是另一个 Adobe 错误还是有一些对齐轴的属性?谢谢
<?xml version="1.0" encoding="utf-8"?>
<s:Application
minHeight="600"
minWidth="955"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable] public var SMITH:ArrayCollection = new ArrayCollection([{date:"22-Aug-05", close:41.87},
{date:"23-Aug-05", close:-45.74},
{date:"24-Aug-05", close:-42.77},
{date:"25-Aug-05", close:48.06},]);
[Bindable] public var DECKER:ArrayCollection = new ArrayCollection([{date:"22-Aug-05", close:157.59},
{date:"23-Aug-05", close:-160.3},
{date:"24-Aug-05", close:-150.71},
{date:"25-Aug-05", close:156.88},]);
]]>
</fx:Script>
<mx:Panel title="Column Chart With Multiple Axes">
<mx:ColumnChart id="myChart"
showDataTips="true"
type="overlaid">
<mx:horizontalAxis>
<mx:CategoryAxis id="h1"
categoryField="date"/>
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
<mx:AxisRenderer placement="bottom"
axis="{h1}"/>
</mx:horizontalAxisRenderers>
<mx:verticalAxisRenderers>
<mx:AxisRenderer placement="left"
axis="{v1}"/>
<mx:AxisRenderer placement="left"
axis="{v2}"/>
</mx:verticalAxisRenderers>
<mx:series>
<mx:ColumnSeries id="cs1"
dataProvider="{SMITH}"
horizontalAxis="{h1}"
yField="close"
displayName="SMITH">
<mx:verticalAxis>
<mx:LinearAxis id="v1"/>
</mx:verticalAxis>
</mx:ColumnSeries>
<mx:LineSeries id="cs2"
dataProvider="{DECKER}"
horizontalAxis="{h1}"
yField="close"
displayName="DECKER">
<mx:verticalAxis>
<mx:LinearAxis id="v2"/>
</mx:verticalAxis>
</mx:LineSeries>
</mx:series>
</mx:ColumnChart>
<mx:Legend dataProvider="{myChart}"/>
</mx:Panel>
</s:Application>
【问题讨论】:
标签: apache-flex charts alignment