Ok, well I've gotten this far with my datatip renderer.  It looks like
all the chart classes call the graphics utilities class to draw the
boring square box, no rounded rectangle method exists in this class. 
If I just roll my own rounded rectangle box inside my DataTipRenderer
constructor, it hides the label... 

So it looks like i need to do is, first extend the graphicsutilities
class and  and then override the fillrect  method to draw a rounded
rectangle, finally extend each chart to use my new extended graphics
utilities instead of the native one.  Does that sound right?

package com.me.data
{
import flash.display.Graphics;
import flash.geom.Rectangle;

import mx.charts.HitData;
import mx.charts.chartClasses.DataTip;
import mx.charts.chartClasses.GraphicsUtilities;
import mx.graphics.IFill;
import mx.graphics.RoundedRectangle;
import mx.graphics.SolidColor;
import mx.graphics.Stroke;
import flash.display.Sprite;
import mx.core.IDataRenderer

public class CustomDataTip extends DataTip implements IDataRenderer
{
                
        override protected function
updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void
        {
       // super.updateDisplayList(unscaledWidth, unscaledHeight);
                var g:Graphics = graphics;
                var xpos:Number = 0;
        var ypos:Number = 0;
                
                //var fill:IFill = IFill(new 
SolidColor(getStyle("backgroundColor"),
0.5));
                //var stroke :Stroke= new Stroke(getStyle("borderColor"), 0, 
100);
                //GraphicsUtilities.fillRect(g, xpos, ypos,
unscaledWidth,unscaledHeight, fill, stroke);
        
        var edit:Sprite = new Sprite();
                edit.graphics.beginFill(getStyle("backgroundColor"),.5);
                
edit.graphics.drawRoundRect(xpos,ypos,unscaledWidth,unscaledHeight,6);
                edit.graphics.endFill();
                addChild(edit);
        }
        }
}


Reply via email to