2 Replies Latest reply on Apr 3, 2007 7:33 PM by aaronc123

    Chart not displaying


      I am modifying some the test drive examples to teach myself and I've run into an issue.

      I am working on a set of two charts, the top onw provides a summary, you click on an item and the bottm show the details.
      The top line chart is working fine, however, the lower chart is not. I can see the data being returned for the second chart, but it is never displayed.

      I've tried a few things and here is the current state of the code.



      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
      <!-- creationComplete="{srv.getSalesTotal()}"> -->

      <mx:Object id="selectedMonth"/>
      <mx:SeriesInterpolate id="interpolate"/>


      private function clickChart(o:Object):void {
      selectedMonth = o;

      <!-- <mx:HTTPService id="srv" url="results.xml"/> -->
      <mx:RemoteObject id="srv" destination="sales"/>
      <mx:Button label="Get Data" click="srv.getSalesTotal()" />

      <mx:Panel title="Revenue Timeline" width="100%" height="100%">
      <mx:LineChart dataProvider="{srv.getSalesTotal.lastResult}" width="100%" height="100%" showDataTips="true"
      <!-- itemClick="selectedMonth = event.hitData.item" -->

      <mx:CategoryAxis categoryField="month"/>

      <mx:LineSeries yField="total"/>


      <mx:Panel title="Product Breakdown" width="100%" height="100%">

      <mx:ColumnChart id="fredChart" dataProvider="{srv.getSalesByMonth(selectedMonth.month).lastResult}" width="100%" height="100%" showDataTips="true">

      <mx:CategoryAxis categoryField="product"/>

      <mx:ColumnSeries yField="total" showDataEffect="interpolate"/>

      <mx:Legend dataProvider="{fredChart}"/>