2
votes

I have a chart component which uses DateTimeAxis axis. I want to use my logic when showing labels, because when showing more then one year worth of data, it's rendering only years (I want to show months as well, cause there's more then enough space to do so).

I've tried setting canDropLabels="false", but it has no effect:

<mx:horizontalAxis>
    <mx:DateTimeAxis id="xaxis" parseFunction="parseDate" />
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
    <mx:AxisRenderer axis="{xaxis}" canDropLabels="false"/>
</mx:horizontalAxisRenderers>

But if I change axis from DateTimeAxis to CategoryAxis, setting canDropLabels does the trick (all labels are rendered):

<mx:horizontalAxis>
    <mx:CategoryAxis id="xaxis" categoryField="date"/>
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
    <mx:AxisRenderer axis="{xaxis}" canDropLabels="true"/>
</mx:horizontalAxisRenderers>

What should I do in order to force showing all labels (actually, function defined with labelFunction will determine what labels to render) when using DateTimeAxis?

Thanks in advance.

1

1 Answers

0
votes

I had a similar problem with functionality I'm designing, and I solved it just with one property that owns class LinearAxis; this property is "interval".