In the below code, I have a large number of data points but the display is so small that it cannot be seen. I searched on the net and followed the canDropLabels = 'true'. But it doesn't seem to be working.
Is there any additional setup needed ? Is there anyway to tell flex not to show all the points but only a few ?
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:local="com.*"
initialize="init()" width="1200" height="1000">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var profits:ArrayCollection;
// initializes the data provider with random data
private function init():void{
profits = new ArrayCollection([
{date:"21-Aug-05", vol:1575.9, rate:41.87},
{date:"21-Aug-05", vol:1300, rate:39.99},
{date:"22-Aug-05", vol:1507.1, rate:42.77},
{date:"23-Aug-05", vol:1568.8 ,rate:48.06},
{date:"24-Aug-05", vol:1575.9, rate:41.87},
{date:"25-Aug-05", vol:1300, rate:39.99},
{date:"26-Aug-05", vol:1507.1, rate:42.77},
{date:"27-Aug-05", vol:1568.8 ,rate:48.06},
{date:"28-Aug-05", vol:1575.9, rate:41.87},
{date:"29-Aug-05", vol:1300, rate:39.99},
{date:"30-Aug-05", vol:1507.1, rate:42.77},
{date:"31-Aug-05", vol:1568.8 ,rate:48.06},
{date:"32-Aug-05", vol:1575.9, rate:41.87},
{date:"33-Aug-05", vol:1300, rate:39.99},
{date:"34-Aug-05", vol:1507.1, rate:42.77},
{date:"35-Aug-05", vol:1568.8 ,rate:48.06},
{date:"36-Aug-05", vol:1575.9, rate:41.87},
{date:"37-Aug-05", vol:1300, rate:39.99},
{date:"38-Aug-05", vol:1507.1, rate:42.77},
{date:"39-Aug-05", vol:1568.8 ,rate:48.06},
{date:"40-Aug-05", vol:1575.9, rate:41.87},
{date:"41-Aug-05", vol:1300, rate:39.99},
{date:"42-Aug-05", vol:1507.1, rate:42.77},
{date:"43-Aug-05", vol:1568.8 ,rate:48.06},
]);
}
]]>
</mx:Script>
<mx:SolidColor id="sc1" color="blue" alpha=".8"/>
<mx:Stroke id="s1" color="blue" weight="1"/>
<mx:Panel title="Line Chart">
<mx:CartesianChart id="myChart" showDataTips="true" >
<!-- zoom window is drawn here -->
<mx:annotationElements>
<mx:CartesianDataCanvas id="chartCanvas"/>
</mx:annotationElements>
<mx:horizontalAxis>
<mx:CategoryAxis id="haxis" />
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
<mx:AxisRenderer placement="bottom" axis="{haxis}" canDropLabels="true"/>
</mx:horizontalAxisRenderers>
<mx:verticalAxisRenderers>
<mx:AxisRenderer placement="left" axis="{vaxis}"/>
</mx:verticalAxisRenderers>
<mx:series>
<mx:ColumnSeries id="series1"
horizontalAxis="{haxis}"
dataProvider="{profits}"
yField="vol"
displayName="VOLUME"
filterData="false"
selectable="true"
>
<mx:verticalAxis>
<mx:LinearAxis id="vaxis" />
</mx:verticalAxis>
</mx:ColumnSeries>
</mx:series>
</mx:CartesianChart>
</mx:Panel>