开发者

How to remove undesirable text/HTML tags from FLEX LineChart's custom dataTips?

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!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜