0 Replies Latest reply on Apr 7, 2010 12:06 PM by Jonny527

    Flex 1009 error Chart datatipfunction

    Jonny527

      I am simply trying to hide a datatip on a chart if the hit data item (yfield item) is == 101 for two differnt series an areaseries and a line series. The following funciton works in IE but throws an error in firefox. I am new to flex and was wondering if there is a better way to approch this..

       

      the code in // is causing the error.

       

      public function datatip_M_chart(e:HitData):String { 
      //if (e.item.STUB == 101) {e.chartItem.itemRenderer.visible = 0}//
      if (e.chartItem is AreaSeriesItem){
              
      return'<b>'+COMBO.selectedLabel+'</b>'+
              
      '<br/><i>Age: </i>' + e.item.STUB +
              
      '<br/><i>Percentage:</i> ' + e.item.M_PROP+'%';
      }else{

              
      return'<b>'+COMBO2.selectedLabel+'</b>'+
              
      '<br/><i>Age: </i>' + e.item.STUB +
              
      '<br/><i>Percentage:</i> ' + e.item.M_PROP+'%';
      }