Oh, I should mention that I also figured out how to evenly space the 
labels and also evenly space the gridlines. I used the intervals 
from the AxisLabelCache. Unfortunately, the series data is no longer 
accurate to the tick marks when I do this. It looks good though !!!

Thanks,
Mike

--- In [email protected], "mgrayfmr" <[EMAIL PROTECTED]> wrote:
>
> Hey Guys- 
> 
> I have a line chart with a numeric Y axis that I want to control 
the 
> number of gridlines.
> Usually, this isn't a problem but sometimes lines are not drawn in 
> even intervals.
> My axis data ranges are dynamic.
> For example, I might have a range of percentages from 88% to 100%. 
> With an interval of 2,
> I get horizontal lines at 88%, 90%, 92%, 94%, 96%, 98%, 100%.
> But when the min and max become 87% and 100%, Flex draws axis 
labels 
> for the same range and leaves off a label for 87% because it is 
only 
> an interval of 1 away from 88%
> 
> I need for the min and max values to be displayed on the axis when 
> there are uneven intervals.
> I have sub-classed the LinearAxis class to manipulate the 
AxisLabel 
> objects, but I am having a hard time creating even intervals.
> The two best scenarios I have come up with is 
> 1) a chart with labels 87% ,90%,. . . 100%, but that leaves a 
larger 
> interval at the bottom of the chart.
> And 2) check for a modulus (means I don't have an even interval), 
> and alternate the intervals 2, than 3, than 2 again.
> This creates uneven gridline intervals, even though the chart is 
> accurately displaying the data
> 
> Ideally, I would like to end up with the second style, with 
> alternating intervals, but have the chart rescale so the intervals 
> appear equal.
> Just to let you know, I am copying the functionality of an 
existing 
> Flash Fusion Chart control, so this isn't a completely random idea!
> The Fusion control asks for the number of divlines you want only, 
> and figures it out from there.
> A Flex chart though, as you probably know, takes an interval 
instead.
> 
> If anyone has any ideas, or has run into anything like this, 
please 
> let me know !!!
> Thanks - Mike Gray
>


Reply via email to