I’m using Flex for charting time series data. the data range is from 2002 to 2009, however the data is not available for some periods of time (i.e from 4/2004 to 8/2005). The following lines show the tags I’m using for the chart:
<mx:Canvas id="cp" backgroundColor="#ffffff" fontFamily="Verdana" fontSize="12" color="#093A89" fontWeight="bold" width="100%" height="100%" alpha="1" creationComplete="init()">
<mx:LineChart id="cChart" showDataTips="true" paddingRight="40" paddingLeft="30" width="100%" height="85%">
<mx:verticalAxis>
<mx:LinearAxis id="linearAxis" baseAtZero="false" title="{parameterLabel}" minorInterval="0.5" interval="1.0"/>
</mx:verticalAxis>
<mx:verticalAxisRenderers>
<mx:AxisRenderer axis="{linearAxis}" fontSize="10">
<mx:axisStroke>
<mx:SolidColorStroke weight="6" color="#BBCCDD" alpha="1" caps="square"/>
</mx:axisStroke>
</mx:AxisRenderer>
</mx:verticalAxisRenderers>
<mx:horizontalAxis>
<mx:DateTimeAxis id="ca" minimum="{sDate}" maximum="{eDate}" title="Date" dataUnits="days" dataInterval="1" labelUnits="days"/>
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
<mx:AxisRenderer axis="{ca}" canDropLabels="true" fontSize="10" labelRotation="45">
<mx:axisStroke>
<mx:SolidColorStroke weight="6" color="#BBCCDD" alpha="1" caps="square"/>
</mx:axisStroke>
</mx:AxisRenderer>
</mx:horizontalAxisRenderers>
<mx:series>
<mx:LineSeries id="l1" visible="false"/>
</mx:series>
</mx:LineChart>
<mx:Legend id="mylgn" horizontalCenter="0" bottom="32"/>
<s:Label id="lblChart1" text="{dataType} {parameterLabel} at {streamLabel}" horizontalCenter="0" bottom="20"/>
<s:Label id="lblChart2" text="{optionalText}" horizontalCenter="0" bottom="5"/>
The following image illustrates the chart created by the above code:

As you can see there are gaps for the intervals with no data. Is there any way to remove/cut the intervals with no data? What is the best practice for this type of data?
Any thoughts or recommendation would be much appreciated
This is accomplished via an adapter to your
dataProvider.To show a horizontal line between missing samples, you must add an additional sample to your data provider with value equal to the last sample.
If you had time series data of:
You would add an additional sample immediately before 8/2005 equal to the previous value of 3.
Instead of interpolating between values 3 and 23, a flat horizontal line is displayed.
Sample data model
Static adapter utility
Data Visualization implementation