1

Does anyone know that it is possible if it is possible to create an item renderer for the data labels of a Flex Pie Chart?

i know it is possible to change the formatting of the String using the label function. But i need more control of the way the data label appears.

The background of the label needs to be a a specific color based on the data.

Thank you in advance for any help you may provide

Russell Milburn
  • 109
  • 2
  • 9

1 Answers1

1
private function pieSeries_labelFunc(item:Object, field:String, index:Number, percentValue:Number):String {
    //process string and return it 
}

in your mxml add this hope this will help

<mx:PieSeries id="pieSeries"
       labelFunction="pieSeries_labelFunc" />
 </mx:series>

Creating custom DataTip renderers

Refer this link for creating costume tool tip

Triode
  • 11,309
  • 2
  • 38
  • 48
  • thank you for that but this only solves half the problem. I can format the String but it is the actual style of the label that i need to change. For Exmaple i need to change the background colour of the label so that if the data is a negative number the background colour is red and if it is a positive number the background of the label is green – Russell Milburn Feb 28 '12 at 12:36