views:

84

answers:

1

Hello, I wrote a function to override my FLEX LineChart's datatips because the default datatips were ugly and rather boring.

I finally set the style I wanted but am now having some problems removing un-necessary tags from being displayed in the custom datatips.

For example, the datatips now display things like this:

"<b>Humidity</b></BR>2010-07-05T00:15:00"

I can always perform a "Replace()" to remove those break and bold HTML tags, but that seems really un-necessary and anti-development.

I am using this to set the dataTip's label text:

var hd:HitData = value as HitData; 
var item:LineSeriesItem = hd.chartItem as LineSeriesItem;
_xAxisText = String(hd.displayText + ' ' + item.xValue);

Why is [displayText] displaying HTML tags I must parse out? How can I format those tags out of my text's value? Is there a setting?

I understand the HTML tag's purpose, although they are not being used by FLEX (apparently). I just dont understand how to remove them from the text. I already set my style attributes in the container, which I think would override these tags? Could that be why they are appearing?

Any ideas or suggestions? Thanks!

+1  A: 

Flex should definitely be using the HTML tags to format your dataTip. Check this article.

Because you are seeing HTML tags in your dataTips, I am wondering if you perhaps implemented the dataTipFunction incorrectly. If you are able to, you should post a little bit more code.

clownbaby
It's actually not a dataTipfunction, the code is in the dataTipRenderer class.I did recently add a dataTipFunction. It fixed my problem (somewhat) but when I removed my rendering class, it did not keep the style I wanted. It seems to pick and choose what gets used and how and where. If I use the function only, it doesnt look right. if I use both, I get some of my data missing. if I use rendering class only, I get the HTML tags in the text.
Devtron