Topic
5 replies Latest Post - ‏2012-03-12T15:35:12Z by SystemAdmin
Mark_CP
Mark_CP
3 Posts
ACCEPTED ANSWER

Pinned topic How to use showDataEffect in AS generated Radar?

‏2012-03-01T19:48:15Z |
I'm creating a Radar Chart and would like to Show the Data Effects. How can I do it when I create the chart in ActionScript. Here's some code I got help with a few months back. Can someone help with the "showDataEffect"?



private function createLineSeries(xds:XML):

void 
{ var s:RadarLineSeries; var dataSource:ArrayCollection; lineSeries = []; 

for each (var x:XML in xds.series) 
{ dataSource = 

new ArrayCollection(); var o:Object=

new Object(); s = 

new RadarLineSeries(); s.dataField = 
"total"; s.categoryField = 
"fullDate"; s.displayName = x.@name; 
//s.showDataEffect="interpolate"; s.setStyle(
'stroke', 

new Stroke(0xaaaaaa, 0, 0.7)); 

for each (var c:XML in x.item) 
{ o = 
{name:x.@name, total:c.@total.toString(), month:c.@month, year:c.@year, fullDate:c.@fullDate
}; dataSource.addItem(o); 
} RadarLineSeries(s).setStyle(
'itemRenderer', 

new ClassFactory(CircleItemRenderer)); RadarLineSeries(s).setStyle(
'radius', 4); s.dataProvider = dataSource; lineSeries.push(s); 
} 
}
Updated on 2012-03-12T15:35:12Z at 2012-03-12T15:35:12Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    151 Posts
    ACCEPTED ANSWER

    Re: How to use showDataEffect in AS generated Radar?

    ‏2012-03-05T13:23:25Z  in response to Mark_CP
    Hi,

    Radar effects are documented here: http://publib.boulder.ibm.com/infocenter/elixent/v3r0/index.jsp?topic=%2Fcom.ibm.ilog.elixir.doc%2FContent%2FVisualization%2FDocumentation%2FFlex%2FElixir_Enterprise%2F_pubskel%2Fps_elixir_corecomponents204.html

    Hope this helps,

    Damien
    • Mark_CP
      Mark_CP
      3 Posts
      ACCEPTED ANSWER

      Re: How to use showDataEffect in AS generated Radar?

      ‏2012-03-05T16:51:04Z  in response to SystemAdmin
      When I try add the effect with setStyle (RadarLineSeries(s).setStyle('showDataEffect', ip);) I get this error:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.

      
      
      
      private function createColumnSeries(xds:XML):
      
      void 
      { var s:RadarColumnSeries; var dataSource:ArrayCollection; columnSeries = []; 
      
      for each (var x:XML in xds.series) 
      { dataSource = 
      
      new ArrayCollection(); var o:Object=
      
      new Object(); s = 
      
      new RadarColumnSeries(); s.dataField = 
      "total"; s.categoryField = 
      "fullDate"; s.displayName = x.@name; 
      
      for each (var c:XML in x.item) 
      { o = 
      {name:x.@name, total:c.@total.toString(), month:c.@month, year:c.@year, fullDate:c.@fullDate
      }; dataSource.addItem(o); 
      } RadarColumnSeries(s).columnWidthRatio = 0.80; RadarColumnSeries(s).setStyle(
      'showDataEffect', ip); s.dataProvider = dataSource; columnSeries.push(s); 
      } 
      }   <mx:SeriesInterpolate id=
      "ip" duration=
      "2000" offset=
      "80" />
      
      • SystemAdmin
        SystemAdmin
        151 Posts
        ACCEPTED ANSWER

        Re: How to use showDataEffect in AS generated Radar?

        ‏2012-03-07T15:23:03Z  in response to Mark_CP
        Hi,

        Could you provide a minimal, runnable sample to reproduce your problem?

        Thanks,

        Damien
        • Mark_CP
          Mark_CP
          3 Posts
          ACCEPTED ANSWER

          Re: How to use showDataEffect in AS generated Radar?

          ‏2012-03-11T20:13:03Z  in response to SystemAdmin
          Thanks Damien I certainly will do that as soon as I have a little time. It's just a minor request from the client in a long list of more pressing things that need to come first. And on that note I have to ask one last question. When using the columns in the Radar the user needs to over at the end of each column to display that data. Is it possible to make the entire column a hot spot for hovering the cursor to show each dataTip?

          Thanks,
          Mark
          • SystemAdmin
            SystemAdmin
            151 Posts
            ACCEPTED ANSWER

            Re: How to use showDataEffect in AS generated Radar?

            ‏2012-03-12T15:35:12Z  in response to Mark_CP
            Hi Mark,

            Which data points receive a data tip is defined by the findDataPoints() method of the serie. So to customize the behavior for a radar column series you have to create a custom class that extends RadarColumnSeries and overrides the findDataPoints(x:Number, y:Number, sensitivity:Number):Array /* of HitData */ method. Basically the method:
            • looks up the renderData.filteredCache array of ColumnSeriesItem to determine which item(s) correspond to the specified coordinates and sensitivity
            • creates an HitData per item
            • returns an array with the HitData.

            Note that the findDataPoints() method and related classes are all part of the base Adobe's Flex Chart framework. So I encourage you to have a look at the sources of in this framework for hints on how to implement the method.

            Let us know if you need more help implementing this.

            Hope this helps,
            Frédéric