Hi,
I am trying to plot a simple scalable line chart with date as x-axis and
some value as y-axis. I used DateTimeAxis for the x-axis and it is able
to nicely scale the labels to fit the axis width when I scale the data
range. However, as the label rescales, so does the date in the datatip:
therefore I get the dates of many data points to be the same...
For example, as I make the range larger, the axis label becomes Jan 06,
Feb 06, etc., instead of each consecutive date - which is fine. However,
the date of the datatip for that entire month also becomes Jan 06
instead of each individual date. Is there anyway I can correct this?
Below is my code:
<mx:VBox verticalGap="0" width="70%" verticalScrollPolicy="off"
horizontalAlign="right">
<mx:CartesianChart id="bigChart" showDataTips="true"
dataProvider="{mainData}" width="100%" height="100%">
<mx:horizontalAxis>
<mx:DateTimeAxis dataUnits="days" />
</mx:horizontalAxis>
<mx:horizontalAxisRenderer>
<mx:AxisRenderer showLine="false" />
</mx:horizontalAxisRenderer>
<mx:verticalAxis>
<mx:LinearAxis baseAtZero="false"/>
</mx:verticalAxis>
<mx:verticalAxisRenderer>
<mx:AxisRenderer styleName="vAxis" visible="true" />
</mx:verticalAxisRenderer>
<mx:series>
<mx:LineSeries yField="GLUCOSE" xField="DATE"
form="curve"/>
</mx:series>
<mx:annotationElements>
<mx:Canvas width="100%" height="100%"
buttonMode="true" mouseDown="setMouseDown(bigChart)" />
</mx:annotationElements>
</mx:CartesianChart>