我有一个LineChart,其中DateTimeAxis为horizontalAxis和最大值。如果某个点超出最大日期,则不会显示整个细分。然而,有没有办法让它出现,直到它到达图表的边界?
这里的代码:
<?xml version="1.0"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<s:Application 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 stockDataAC:ArrayCollection = new ArrayCollection( [
{date:new Date(2005,7,27), close: 32.71},
{date:new Date(2005,7,29), close: 42.11},
{date:new Date(2005,8,4), close: 102.99}]);
]]>
</fx:Script>
<mx:Panel title="DateTimeAxis Example">
<mx:LineChart id="mychart" height="100%" width="100%"
paddingRight="5" paddingLeft="5"
showDataTips="true" dataProvider="{stockDataAC}">
<mx:horizontalAxis>
<mx:DateTimeAxis dataUnits="days" maximum="{new Date(2005,8,2)}"/>
</mx:horizontalAxis>
<mx:verticalAxis>
<mx:LinearAxis baseAtZero="false" />
</mx:verticalAxis>
<mx:series>
<mx:LineSeries yField="close" xField="date" displayName="AAPL"/>
</mx:series>
</mx:LineChart>
</mx:Panel>
</s:Application>