1 Reply Latest reply on Aug 29, 2008 2:16 AM by Newsgroup_User

    Chart sample can not run

    cmd1996
      Hi All,
      I run a chart sample,when the data is a big negative number,the chart can not display.
      <?xml version="1.0"?>
      <!-- charts/BasicColumn.mxml -->
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
      <mx:Script><![CDATA[
      import mx.collections.ArrayCollection;
      [Bindable]
      public var expenses:ArrayCollection = new ArrayCollection([
      {Month:"Jan", Profit:-16401640, Expenses:1500},
      {Month:"Feb", Profit:-16401640, Expenses:1500}
      ]);
      ]]></mx:Script>
      <mx:Panel title="Column Chart">
      <mx:ColumnChart id="myChart" dataProvider="{expenses}" showDataTips="true">
      <mx:horizontalAxis>
      <mx:CategoryAxis
      dataProvider="{expenses}"
      categoryField="Month"
      />
      </mx:horizontalAxis>
      <mx:series>
      <mx:ColumnSeries
      xField="Month"
      yField="Profit"
      displayName="Profit"
      />

      </mx:series>
      </mx:ColumnChart>
      <mx:Legend dataProvider="{myChart}"/>
      </mx:Panel>
      </mx:Application>
      Error message is :
      Error: Error #1502: 脚本的执行时间已经超过了 15 秒的默认超时设置。
      at mx.charts::AxisRenderer/processAxisLabels()[C:\Work\flex\dmv_automation\projects\datavisu alisation\src\mx\charts\AxisRenderer.as:3363]
      at mx.charts::AxisRenderer/measureLabels()[C:\Work\flex\dmv_automation\projects\datavisualis ation\src\mx\charts\AxisRenderer.as:1747]
      at mx.charts::AxisRenderer/calcRotationAndSpacing()[C:\Work\flex\dmv_automation\projects\dat avisualisation\src\mx\charts\AxisRenderer.as:1459]
      at mx.charts::AxisRenderer/adjustGutters()[C:\Work\flex\dmv_automation\projects\datavisualis ation\src\mx\charts\AxisRenderer.as:1326]
      at mx.charts::AxisRenderer/set gutters()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRender er.as:798]
      at mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:\Work\flex\dmv_automation\pro jects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:1890]
      at mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:\Work\flex\dmv_automation\pr ojects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:1355]
      at mx.core::UIComponent/validateDisplayList()
      at mx.managers::LayoutManager/validateDisplayList()
      at mx.managers::LayoutManager/doPhasedInstantiation()
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.core::UIComponent/callLaterDispatcher2()
      at mx.core::UIComponent/callLaterDispatcher()
      Please help me.Thanks.