0
:http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_12.html如何對齊垂直軸零在此基礎上的Adobe多軸圖表例如多個垂直軸圖表
然後,我改變了一些數據值來負,我成了軸不再一致。
有誰知道如何使垂直軸?這是另一個Adobe bug還是有一些對齊軸的屬性?謝謝
<?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>
謝謝,這部分解決了這個問題。但是由於某種原因,存在黑暗的水平線...... – zinovii 2011-03-22 12:07:38
請更具體一點,你的意思是什麼黑線? – 2011-03-23 06:23:45
我想我知道「黑色水平線」是什麼。它似乎是圖表的起源線。它確實被置於錯誤的位置。在玩過這個問題之後,我修改了一個例子。 – 2011-03-23 09:08:48