Thanks, that was a really helpful example. To fix it, I stuck the chart into a
canvas, and it seems to be ignoring that preferred size of 400x400 now.
From: valdhor
To: flexcoders@yahoogroups.com
Sent: Friday, August 14, 2009 9:02:53 AM
Subject: [flexcoders] Re: Changing chart "preferred size"
That can't be right. Have you seen the Flex Dashboard app at http://examples.
adobe.com/ flex3/devnet/ dashboard/ main.html ? If you minimize all the panels
except the pie chart panel, you will note the pie chart gets much larger than
400x400 and piechart is derived from chartbase.
You should probably download the source from there and see how they do it.
HTH
Steve
--- In flexcod...@yahoogro ups.com, "aaronsarnoff" wrote:
>
> The flex API points to the fact that the ChartBase (and the other charts that
> are derived from it) have a preferred size of 400x400 (towards the top of
> http://livedocs. adobe.com/ flex/3/langref/ mx/charts/ chartClasses/
> ChartBase. html).
>
> I am having an issue where I want the chart to take up 100% of the container
> that it is in (so when it is resized, it stays the same size as the
> container). By simply specifying percentWidth and percentHeight as 100 -
> when the dimension of the container is less than 400, the chart resizes
> properly; however, when the dimension of the container becomes larger than
> 400, the chart remains at the 400x400 size.
>
> Is there a way to change or remove this "preferred size" constraint from the
> chart? I've looked through all the variables and functions that seem
> relevant, but none of them have the intended effect.
>
> -Aaron
>