Consider the following simple chart binding code below.

If you change the CategoryAxis labels ('dt') (or any string for that
field) to be identical, 
-and-
the chart's width is such that dropping of labels needs to occur
-and-
"canDropLabels" is set to true

The application will hang indefinitely (or at least until the AS
engine timeout hits).

I understand that having identical labels on the CategoryAxis is
absolutely counter-productive and serves no real-world purpose,
but it seems like the framework code is inferring meaning to the x-y
pair and the x-axis's label, other than their index relative to other
pairs.

Has anyone seen anything like this, or can you speak to why the
framework might choke when the x-axis labels are identical?
(I have begun digging through the framework code, but haven't found an
explanation yet)

(How this came up: dummy data was generated with (incorrect) identical
timestamps)

Thanks very much for your time,


Geoff



<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute" creationComplete="init()">

    <mx:Script>
        <![CDATA[
                import mx.collections.ArrayCollection;
                
                [Bindable]
                private var _data:Array;
                
                private function init():void{
                        _data = [
                                {'count':10, 'dt': '2007-5-10'},
                                {'count':8, 'dt': '2007-5-11'},
                                {'count':3, 'dt': '2007-5-12'},
                                {'count':12, 'dt': '2007-5-13'},
                                {'count':19, 'dt': '2007-5-14'},
                                {'count':2, 'dt': '2007-5-15'}
                        ];
                }
                
        ]]>
    </mx:Script>
    
    <mx:LineChart width="200" dataProvider="{_data}">
        <mx:horizontalAxis>
            <mx:CategoryAxis categoryField="dt" title="Time"/>
        </mx:horizontalAxis>
        <mx:horizontalAxisRenderer>
                <mx:AxisRenderer canDropLabels="true"/>
        </mx:horizontalAxisRenderer>
        <mx:series>
            <mx:LineSeries yField="count" form="curve"  />
        </mx:series>
    </mx:LineChart>

</mx:Application>



Reply via email to