[flexcoders] Problems with showDataEffect trigger looping on Chart Seris in Flex 3

2008-06-06 Thread mgrayfmr
Has anyone run into this issue in Flex 3?
The showDataEffect is looping endlessly, causing a transtion to run 
over and over again.

I have two charts, one a LineChart and one a ColumnChart.
On the series of each, I have set the 
showDataEffect="{nameOfEffectHere}"
For the LineChart, the effect is declared as:



For the ColumnChart, it is declared as:


In both cases, the effect loops.
I cannot find what is causing the showDataEffect to be triggered.
This code worked fine in Flex 2.0, but breaks in Flex 3.0.

Any info would be appreciated!!!
Mike



[flexcoders] Re: Webservice implementation switched to e4x after Flex 2.0.1 hotfix 2

2008-06-05 Thread mgrayfmr
--- In flexcoders@yahoogroups.com, "mgrayfmr" <[EMAIL PROTECTED]> wrote:
>
> Hi there:
> 
> We've run into some webservice issues here when switching from Flex 
> 2.0.1 (not the hotfix version) to Flex 3. We are retrieving data 
from 
> a .NET backend using a SOAP/wsdl format. When we switched to Flex 
> 3.0, the structures returned on the repsonse were sometimes a 
little 
> different. 
> 
> For example, we had a data structure returned that was like this: 
> data.result.UserProfileResponse.snapshots.Calendars
> Where Calendars was an ArrayCollection.
> 
> Now the struture comes back without the Calendars part, and the 
data 
> is in an ArrayCollection under the 
> data.result.UserProfileResponse.snapshots structure.
> 
> The wsdl loks like this:
> 
> 
> Is this a result of the changes to implement e4x on webservices?
> Has anyone else run into this issue?
> 
> Thanks in advance,
> Mike
>
It seems this is a knonw bug with Adobe in Flex 3.
If there are nested Arrays, Flex will not handle them properly.
Flex 3.0 also will drop data if the structure of the data is not 
ordered exactly as the WSDL dictates. This all wokred fine in Flex 
2.0.1. A seriously bad mistake by Adobe to let these bugs slip 
through.

So it turns out that switching our Webservice to handle SOAP 
responses from 'object' to 'e4x' seems to have solved the problem.
We then used this to set the data back to objects to match the 
structure that our Cairngorm responders were expecting:
protected function parseXMLData(xmlData:String) : 
Object
{
var xmlDoc:XMLDocument = new XMLDocument(xmlData);
var decoder:SimpleXMLDecoder = new 
SimpleXMLDecoder(true);
var obj:Object = decoder.decodeXML(xmlDoc);

var data:Object = new Object;

for(var i:int = 0; i < 2; i++)
{
for each(var tempObj:Object in obj)
{
obj = tempObj;
}
}
data.result = obj

return data;

}




[flexcoders] Webservice implementation switched to e4x after Flex 2.0.1 hotfix 2

2008-06-04 Thread mgrayfmr
Hi there:

We've run into some webservice issues here when switching from Flex 
2.0.1 (not the hotfix version) to Flex 3. We are retrieving data from 
a .NET backend using a SOAP/wsdl format. When we switched to Flex 
3.0, the structures returned on the repsonse were sometimes a little 
different. 

For example, we had a data structure returned that was like this: 
data.result.UserProfileResponse.snapshots.Calendars
Where Calendars was an ArrayCollection.

Now the struture comes back without the Calendars part, and the data 
is in an ArrayCollection under the 
data.result.UserProfileResponse.snapshots structure.

The wsdl loks like this:


Is this a result of the changes to implement e4x on webservices?
Has anyone else run into this issue?

Thanks in advance,
Mike




[flexcoders] Re: Help !!! How to decode URL encoding

2007-04-10 Thread mgrayfmr
Perfect - thanks !!!
I knew I must be looking in the wrong place.
It seemed like a use for this wouldn't be too uncommon.

--- In flexcoders@yahoogroups.com, "Doug Lowder" <[EMAIL PROTECTED]> 
wrote:
>
> There's a top-level decodeURI() function:
> 
> http://livedocs.adobe.com/flex/201/langref/package.html#decodeURI()
> 
> 
> --- In flexcoders@yahoogroups.com, "mgrayfmr"  wrote:
> >
> > Hi Guys:
> > 
> > I am trying to parse a string that is URL encoded, and I want to 
> > remove, or decode it.
> > I was surprised that there wasn't something available in a 
utility 
> > class already in AS3.
> > Anyone ever run into this ?
> > 
> > I saw a post that had a link to some code that sounds like it 
would 
> > solve my problem:
> > http://tech.groups.yahoo.com/group/flexcoders/message/55312
> > But the post is missing any code snippets.
> > 
> > If anyone has any ideas, please let me know !!!
> > Thanks,
> > Mike
> >
>




[flexcoders] Help !!! How to decode URL encoding

2007-04-10 Thread mgrayfmr
Hi Guys:

I am trying to parse a string that is URL encoded, and I want to 
remove, or decode it.
I was surprised that there wasn't something available in a utility 
class already in AS3.
Anyone ever run into this ?

I saw a post that had a link to some code that sounds like it would 
solve my problem:
http://tech.groups.yahoo.com/group/flexcoders/message/55312
But the post is missing any code snippets.

If anyone has any ideas, please let me know !!!
Thanks,
Mike



[flexcoders] Re: Flex2 - Bug with chart Legend and ScrollPolicy

2007-02-28 Thread mgrayfmr
I take back my last message.
This is still messed up.
This only creates scrollbars if the VBox or HBox is smaller than the 
Legend's display area.
As Ely, mentioned, Legend extends from Tile.
That's why it has the wrapping going on when a legend has more items 
than can be displayed in a line.
If you have a sizeable legend, I don't see a way currently to add a 
scrollbar. 

As an alterantive, you could create a hard coded legend. In my case 
the items are added dynamically, and the series/legend colors are 
determined by info in my dataProvider, so i can't hard code a legend.

--- In flexcoders@yahoogroups.com, "mgrayfmr" <[EMAIL PROTECTED]> wrote:
>
> Hey guys:
> 
> Just an update to this problem.
> If you put the legend inside a VBox or HBox, and set a fixed 
> width/height, scrollbars can be added. This assumes the 
scrollpolicy 
> is set to either 'auto' or 'on'.
> I tried this out and it worked. The only drawback is you can't use 
> percentages for width and height.
> 
> Cheers,
> Mike
> 
> --- In flexcoders@yahoogroups.com, "thunderstumpgesatwork" 
>  wrote:
> >
> > I did Anchor both the left and right sides of the HBox. Maybe the
> > appearance of the scrollbars for the HBox caused the outer canvas
> > scrollbars to appear too?
> > 
> > I'll check this out again when I upgrade to Beta2.
> > 
> > thanks for the info.
> > Thunder
> > 
> > --- In flexcoders@yahoogroups.com, "Ely Greenfield"  
> wrote:
> > >
> > > 
> > > 
> > > Hi Thunder.  The chart legend wasn't built to scroll. For 
> codesize
> > > reasons, it extends Tile, which means it inherits scroll 
> functionality,
> > > but it's been explicitly disabled.
> > > 
> > > Assuming you either anchored both sides of the hbox 
(left/right 
> or
> > > top/bottom, depending on what direction you're talking about) 
or 
> set an
> > > explicit width/height, it should definitely constrain the 
hbox, 
> forcing
> > > scrollbars. 
> > > 
> > > Ely.
> > > 
> > > 
> > > -Original Message-
> > > From: flexcoders@yahoogroups.com 
> [mailto:[EMAIL PROTECTED] On
> > > Behalf Of thunderstumpgesatwork
> > > Sent: Friday, March 24, 2006 12:07 PM
> > > To: flexcoders@yahoogroups.com
> > > Subject: [flexcoders] Flex2 - Bug with chart Legend and 
> ScrollPolicy
> > > 
> > > Hi,
> > > 
> > > I am trying to get the chart legend to scroll if there are 
more 
> items
> > > than room to display. I have set the 'hScrollPolicy' to "auto" 
> both in
> > > mxml, and after adding the chart series, in ActionScript.
> > > 
> > > In the debugger the value is always 'off' even immediately 
after 
> setting
> > > it.
> > > 
> > > To work around this I tried putting the legend in an HBox to 
> perform the
> > > scrolling. I am using Anchor LayoutConstraints on a Canvas, 
and 
> I put
> > > the Anchor on the HBox, but aparently it doesn't take 
precedence 
> over a
> > > large child (the legend) because the HBox just grew, and 
caused 
> the
> > > whole canvas to add scrollbars.
> > > 
> > > This may be two bugs, but seems like at least one.
> > > 
> > > let me know if I'm missing something.
> > > thanks,
> > > Thunder
> > > 
> > > 
> > > 
> > > 
> > > 
> > > --
> > > Flexcoders Mailing List
> > > FAQ: 
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > Search Archives:
> > > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > > Yahoo! Groups Links
> > >
> >
>




[flexcoders] Re: Flex2 - Bug with chart Legend and ScrollPolicy

2007-02-28 Thread mgrayfmr
Hey guys:

Just an update to this problem.
If you put the legend inside a VBox or HBox, and set a fixed 
width/height, scrollbars can be added. This assumes the scrollpolicy 
is set to either 'auto' or 'on'.
I tried this out and it worked. The only drawback is you can't use 
percentages for width and height.

Cheers,
Mike

--- In flexcoders@yahoogroups.com, "thunderstumpgesatwork" 
<[EMAIL PROTECTED]> wrote:
>
> I did Anchor both the left and right sides of the HBox. Maybe the
> appearance of the scrollbars for the HBox caused the outer canvas
> scrollbars to appear too?
> 
> I'll check this out again when I upgrade to Beta2.
> 
> thanks for the info.
> Thunder
> 
> --- In flexcoders@yahoogroups.com, "Ely Greenfield"  
wrote:
> >
> > 
> > 
> > Hi Thunder.  The chart legend wasn't built to scroll. For 
codesize
> > reasons, it extends Tile, which means it inherits scroll 
functionality,
> > but it's been explicitly disabled.
> > 
> > Assuming you either anchored both sides of the hbox (left/right 
or
> > top/bottom, depending on what direction you're talking about) or 
set an
> > explicit width/height, it should definitely constrain the hbox, 
forcing
> > scrollbars. 
> > 
> > Ely.
> > 
> > 
> > -Original Message-
> > From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> > Behalf Of thunderstumpgesatwork
> > Sent: Friday, March 24, 2006 12:07 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Flex2 - Bug with chart Legend and 
ScrollPolicy
> > 
> > Hi,
> > 
> > I am trying to get the chart legend to scroll if there are more 
items
> > than room to display. I have set the 'hScrollPolicy' to "auto" 
both in
> > mxml, and after adding the chart series, in ActionScript.
> > 
> > In the debugger the value is always 'off' even immediately after 
setting
> > it.
> > 
> > To work around this I tried putting the legend in an HBox to 
perform the
> > scrolling. I am using Anchor LayoutConstraints on a Canvas, and 
I put
> > the Anchor on the HBox, but aparently it doesn't take precedence 
over a
> > large child (the legend) because the HBox just grew, and caused 
the
> > whole canvas to add scrollbars.
> > 
> > This may be two bugs, but seems like at least one.
> > 
> > let me know if I'm missing something.
> > thanks,
> > Thunder
> > 
> > 
> > 
> > 
> > 
> > --
> > Flexcoders Mailing List
> > FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
>




[flexcoders] Re: How to align identical CategoryAxis as HorizontalAxis and SecondHorizontalAxis

2007-02-26 Thread mgrayfmr
Holy cow, I figured it out, and it's stoopid easy.
It may not be that apparent at first glance though.
All I needed to do was set the padding to 0 for my horizontal axis.
It seems that by default, the padding for my top/secondHorizontal 
axis, which is a CategoryAxis, was 0.5. By Setting it to 0, it now 
mathches the scaling of my bottom horizontal axis.
Done !!!

--- In flexcoders@yahoogroups.com, "mgrayfmr" <[EMAIL PROTECTED]> wrote:
>
> Help Ely (or anyone who knows) !!!
> 
> I'm having trouble with the data being displayed in a LineChart.
> I have same data in a horizontal and secondhorizontal category 
axis. 
> I am also displaying vertical gridlines using the 
backgroundElements 
> property. What is happening is that the spacing is different for 
the 
> bottom and top axis. The bottom axis is fine but the top is 
spacing 
> the interval differently than the bottom axis. The gridlines are 
> aligne with the top axis interval. Basically, I end up with data 
in 
> each series that don't match up because they align to two 
different 
> axises. Is there a way to control how Flex sets the divlines ? I 
have 
> tried creating a sub-class of Category axis, but nothing seems to 
be 
> of help.
> I have managed to get the top axis labels to display in the 
correct 
> spacing, but this does not change the actual plot points on the 
> gridlines.
> 
> Any help would be appreciated !!!
>




[flexcoders] Re: Charting - create a secondSeries with Actionscript 3.0 ???

2007-02-26 Thread mgrayfmr
Thanks Brendan>
I think my problem was caused by me specifying a secondDataProvider 
on my LineChart.
Here is a snippet of what worked for me :
My chart is named chLinearChart

var tmpSeriesArrayColl : ArrayCollection;
var ls_P : LineSeries;
var stroke : Stroke;
var tmpFill : LinearGradient;

//Custom ValueObject that holds cahrt data
tmpSeriesArrayColl = ChartDataVO.arrPageByProducerChartData;

for(var k:int = 0; k < tmpSeriesArrayColl.length - 1; k++)
{   
ls_P = new LineSeries();
ls_P.displayName = tmpSeriesArrayColl[k].name; 
ls_P.yField = 'value'; 
ls_P.xField = 'time'; 
//Use the color specified in XML for the stroke
stroke = new Stroke();
stroke.color = tmpSeriesArrayColl[k].color;
stroke.weight = 2;
//My tmpSeriesArrayColl contains a gradient fill I created earlier
tmpFill = tmpSeriesArrayColl[k].fill;
ls_P.setStyle("lineStroke", stroke);
//So the legend dynamically gets the correct color
ls_P.setStyle("fill", tmpSeriesArrayColl[k].color);
ls_P.dataProvider = tmpSeriesArrayColl[k].data; 
this.chLinearChart.secondSeries.push(ls_P); 
}

--- In flexcoders@yahoogroups.com, "Brendan Meutzner" 
<[EMAIL PROTECTED]> wrote:
>
> Hey Mike,
> 
> dataProvider="{_localChartData}"
> secondDataProvider="{_localChartData}"
>series="{_firstSeriesArray}"
> secondSeries="{_secondSeriesArray}">
> 
> 
> 
> 
> 
> 
> Perhaps you're missing the secondDataProvider property?
> 
> 
> Brendan
> 
> 
> 
> 
> On 2/23/07, leds usop <[EMAIL PROTECTED]> wrote:
> >
> >   a code post will help :)
> >
> > --- mgrayfmr <[EMAIL PROTECTED] > wrote:
> >
> > > Hey Gang -
> > >
> > > Has anyone had any experience with dynamically
> > > adding a second series
> > > to a chart using actionscript 3.0 ?
> > > Using a LineChart object I have been dynamically
> > > creating new
> > > LineSeries under the linechart's series with no
> > > problem.
> > > I am not having luck adding a second series though.
> > > The data is fine, it just won't display a second
> > > series.
> > > To test, I added my secondSeries data to the primary
> > > series, and it
> > > displays (but realtive to the wrong Y axis,
> > > obviously).
> > >
> > > If anyone has any ideas, I would appreciate it.
> > > If I find a solution, I'll post it here as well.
> > >
> > > Thanks,
> > > Mike
> > >
> > >
> >
> > __
> > Sucker-punch spam with award-winning protection.
> > Try the free Yahoo! Mail Beta.
> > http://advision.webevents.yahoo.com/mailbeta/features_spam.html
> >  
> >
> 
> 
> 
> -- 
> Brendan Meutzner
> Stretch Media - RIA Adobe Flex Development
> [EMAIL PROTECTED]
> http://www.stretchmedia.ca
>




[flexcoders] How to align identical CategoryAxis as HorizontalAxis and SecondHorizontalAxis

2007-02-26 Thread mgrayfmr
Help Ely (or anyone who knows) !!!

I'm having trouble with the data being displayed in a LineChart.
I have same data in a horizontal and secondhorizontal category axis. 
I am also displaying vertical gridlines using the backgroundElements 
property. What is happening is that the spacing is different for the 
bottom and top axis. The bottom axis is fine but the top is spacing 
the interval differently than the bottom axis. The gridlines are 
aligne with the top axis interval. Basically, I end up with data in 
each series that don't match up because they align to two different 
axises. Is there a way to control how Flex sets the divlines ? I have 
tried creating a sub-class of Category axis, but nothing seems to be 
of help.
I have managed to get the top axis labels to display in the correct 
spacing, but this does not change the actual plot points on the 
gridlines.

Any help would be appreciated !!!



[flexcoders] Re: Just curious, A big development team or individual developers

2007-02-23 Thread mgrayfmr
Same here - just me, but hopefully not for long.

--- In flexcoders@yahoogroups.com, "Paul DeCoursey" <[EMAIL PROTECTED]> wrote:
>
> We need a team but alas it is just me (INDIVIDUAL).
> 
> --- In flexcoders@yahoogroups.com, "boy_trike"  wrote:
> >
> > I wonder how many people are working on TEAM to develop their flex
> applications (and how 
> > many are 1 or 2 men (whoops I mean PEOPLE) developers.  Please
> discount the Graphic 
> > artists, HTML coders. et. al.  If you have 3 or more people working
> on the same flex 
> > application, please answer as a TEAM.  2 or 1, INDIVIDUAL.
> > 
> > Thanks
> > Bruce
> >
>




[flexcoders] Charting - create a secondSeries with Actionscript 3.0 ???

2007-02-23 Thread mgrayfmr
Hey Gang - 

Has anyone had any experience with dynamically adding a second series 
to a chart using actionscript 3.0 ?
Using a LineChart object I have been dynamically creating new 
LineSeries under the linechart's series with no problem. 
I am not having luck adding a second series though.
The data is fine, it just won't display a second series.
To test, I added my secondSeries data to the primary series, and it 
displays (but realtive to the wrong Y axis, obviously).

If anyone has any ideas, I would appreciate it.
If I find a solution, I'll post it here as well.

Thanks,
Mike



[flexcoders] Re: Does anyone know how to set a legendMarkerRenderer dynamically ???

2007-02-09 Thread mgrayfmr
I tried something else on a suggestion, that also did not work, even 
though it seems OK.

I created a style sheet entry like this:
.legendRenderer
{
legendMarkerRenderer:   ClassReference
("mx.charts.renderers.CircleItemRenderer");
}

I made sure the style sheet was included in my app.
I then set the style of my series like this:
for(var k:int = 0; k < tmpSeriesArrayColl.length - 1; k++)
{ 
ls = new LineSeries();
ls.displayName = tmpSeriesArrayColl[k].name;
ls.yField = 'value'; 
ls.xField = 'time';  
ls.form = "line";
ls.dataProvider = tmpSeriesArrayColl[k].data;

stroke = new Stroke();
//Use the color specified in XML for the stroke
stroke.color = tmpSeriesArrayColl[k].color;
stroke.weight = 1;
ls.setStyle("lineStroke", stroke);
ls.styleName = "legendRenderer";
this.linechart.series[k] = ls;  
}
}

It still complained that the object did not find the IFactory 
interface. So it is trying to load my renderer.
It looks like the answer would be to sub-class the renderer and 
implement the IFactory interface. 
Just thought I would share in case anyone sees this issue.

--- In flexcoders@yahoogroups.com, "mgrayfmr" <[EMAIL PROTECTED]> wrote:
>
> I am creating LineSeries objects dynamically, and I want to be 
able 
> to use the CircleItemRenderer for the legend. 
> I tried doing this several ways, but get an error that the 
renderer 
> cannot be cast to a type of IFactory. I tried making sure 
> CircleItemRenderer was imported, and using new CircleItemRenderer
(), 
> but no dice.
> 
> I'm doing something like this.
> The only line that blows up is the LegendMarkerRenderer.
> My array contains series data, a display name, and a color.
> 
> for(var k:int = 0; k < ChartDataVO.arrCollSeriesArray.length - 1; 
> k++)
> { 
>ls = new LineSeries();
>ls.displayName = ChartDataVO.arrCollSeriesArray[k].name;
>ls.yField = 'value'; 
>ls.xField = 'time';  
>ls.form = "line";
>ls.dataProvider = ChartDataVO.arrCollSeriesArray[k].data;
>   
>stroke = new Stroke();
>stroke.color = ChartDataVO.arrCollSeriesArray[k].color;
>stroke.weight = 1;
>ls.setStyle("lineStroke", stroke);
>ls.setStyle
> ("legendMarkerRenderer", "mx.charts.renderers.CircleItemRenderer");
>ls.styleName = ChartDataVO.arrCollSeriesArray_AVG[k].key; 
>this.linechart.series[k] = ls;  
> }
> 
> Anyone have any insights ?
> Thanks in advance !!!
> Mike
>




[flexcoders] Does anyone know how to set a legendMarkerRenderer dynamically ???

2007-02-09 Thread mgrayfmr
I am creating LineSeries objects dynamically, and I want to be able 
to use the CircleItemRenderer for the legend. 
I tried doing this several ways, but get an error that the renderer 
cannot be cast to a type of IFactory. I tried making sure 
CircleItemRenderer was imported, and using new CircleItemRenderer(), 
but no dice.

I'm doing something like this.
The only line that blows up is the LegendMarkerRenderer.
My array contains series data, a display name, and a color.

for(var k:int = 0; k < ChartDataVO.arrCollSeriesArray.length - 1; 
k++)
{ 
   ls = new LineSeries();
   ls.displayName = ChartDataVO.arrCollSeriesArray[k].name;
   ls.yField = 'value'; 
   ls.xField = 'time';  
   ls.form = "line";
   ls.dataProvider = ChartDataVO.arrCollSeriesArray[k].data;

   stroke = new Stroke();
   stroke.color = ChartDataVO.arrCollSeriesArray[k].color;
   stroke.weight = 1;
   ls.setStyle("lineStroke", stroke);
   ls.setStyle
("legendMarkerRenderer", "mx.charts.renderers.CircleItemRenderer");
   ls.styleName = ChartDataVO.arrCollSeriesArray_AVG[k].key; 
   this.linechart.series[k] = ls;  
}

Anyone have any insights ?
Thanks in advance !!!
Mike



[flexcoders] Re: Any ideas on customizing labels an gridlines in LinearAxis of LineChart ?

2007-01-23 Thread mgrayfmr
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 flexcoders@yahoogroups.com, "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
>




[flexcoders] Any ideas on customizing labels an gridlines in LinearAxis of LineChart ?

2007-01-23 Thread mgrayfmr
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