2 Replies Latest reply on Apr 22, 2011 2:41 PM by Jason Szeto

    Large Negative Number in Column Chart

      When using a large negative number (eight digits or more) from hierarchical data in a column chart, the browser FREEZES. Has anyone else experienced this? Any suggestions on how to fix? See the sample code below.

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

      <mx:Script>
          <![CDATA[
             
              //hierarchical data.
              [Bindable]      
              private var input:Array = [
                
                  { xfield:"World", value:-50000000, children:[
                 
                  { xfield:"Asia", value:15, children:[ { xfield:"Bhutan", value:1 }, { xfield:"Singapore", value:5 }, { xfield:"Thailand", value:17 }, { xfield:"India", value:10 }, { xfield:"Japan", value:15 }, { xfield:"Nepal", value:5 }]},
                  { xfield:"America", value:30, children:[ { xfield:"Mexico", value:5 }, { xfield:"Brazil", value:8 }, { xfield:"Chille", value:6 }, { xfield:"US", value:25 }, { xfield:"Canada", value:22 } ]},
                  { xfield:"Europe", value:20, children:[ { xfield:"Switzerland", value:8 }, { xfield:"UK", value:15 }, { xfield:"Germany", value:15 }, { xfield:"France", value:5 }] },
                  { xfield:"Australia", value:23 }
                  ] }
                 
              ];
             
          ]]>
      </mx:Script>

      <mx:ColumnChart id="chart" dataProvider="{input}" height="200" width="254" x="25" y="10">
          <mx:horizontalAxis>
              <mx:CategoryAxis categoryField="xfield" />       
          </mx:horizontalAxis>   
          <mx:series>
              <mx:ColumnSeries yField="value" />
          </mx:series>
      </mx:ColumnChart>

      </mx:Application>