Using HitData to get data points from a lineSeries

View: New views
2 Messages — Rating Filter:   Alert me  

Using HitData to get data points from a lineSeries

by lmrudner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am sure this is simple for someone; just not me.

I am trying to gather the data in a lineSeries into array ar so I can pull datapoints in the form ar[i]. The lineSeries is dynamic.

This does not work

function dtFunc(e:HitData):String {
       var mya:LineSeries LineSeries(e.element) as LineSeries;
       var ar:Array = mya.items as Array;
...

}

Any suggestions as to what would.



Re: Using HitData to get data points from a lineSeries

by lmrudner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Got it.

LineSeries(e.element).items IS an array. It is an array of LineSeriesItems which is collection with lots of things including a yValue. I can get the y values by looping through ar[i].yValue.



--- In flexcoders@..., "lmrudner" <lmrudner@...> wrote:

>
> I am sure this is simple for someone; just not me.
>
> I am trying to gather the data in a lineSeries into array ar so I can pull datapoints in the form ar[i]. The lineSeries is dynamic.
>
> This does not work
>
> function dtFunc(e:HitData):String {
>        var mya:LineSeries LineSeries(e.element) as LineSeries;
>        var ar:Array = mya.items as Array;
> ...
>
> }
>
> Any suggestions as to what would.
>