开发者

Flex BarChart long text

In my application, I am using a BarChart to display data. However, the text in the category axis can be too long to display on the chart, so flex adjusts the font size automatically to the point that the data is either unreadable, or the text is partially visible.

The length of the text varies every time new data comes in, so I can't set the gutterLeft attribute to a static value at runtime.

Two things that come to my mind are:

  1. Change the gutter dynamically according to new data

  2. Have a scroll bar on the categoryaxis so that if any text won't fit in the space, the user can scroll to see it

Any help would be appreciated.

EDIT: I have hundreds of rows of data 开发者_如何学Gobeing graphed at once, so I can't really use a legend for each item.

Also, I have no idea how to change the gutterLeft property with actionscript. Doing it in MXML is as simple as

gutterLeft="100"

but I cannot access the property using actionscript. I also tried to bind the gutterLeft variable to an integer and change that integer and it still didn't work. :|


the problem is that gutterleft is a style, and therefor needs to be set as one when using actionscript.

I was hoping to see your code to give a more detailed answer but what you want to do is:

mychart.setStyle("gutterLeft",500);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜