0 Replies Latest reply on Apr 5, 2011 9:27 AM by HenrySeng-CH

    LineChart Broken Line With DateTimeAxis

    HenrySeng-CH

      Hi,

       

      I have a LineChart with a DateTimeAxis as horizontalAxis and a maximum set. If a point is beyond the maximum date, the whole segment will not appear. Yet, is there a way to make it appear until it reachs the border of the chart?

       

      You can see below what I am speaking about :

       

      Broken

      sampleBroken.JPG

       

      OK if the maximum value of the DateTimeAxis is greater than the date of the point

      sampleFine.JPG

       

      The code here :

       

      <?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>