Yes, this is an issue if you're trying to update the "range" on the series.
Things I've tried:
1) Base the upper range's minimum and maximum values for the axis on the
range selector -- no real improvement in performance with this.
Additionally, you don't get the dynamic axis range changes if baseAtZero is
set to false, because "entire" range is really being shown... just limited.
By slicing dataset you get that functionality. I suppose this may or may
not be a blocking point for you depending on your implementation.
2) Re-wrote series renderer class -- this improved mouseover "show
datapoint" functionality as well as range selection. The renderers I
provided in the example were too bulky for their purpose. Re-write here:
package range_charts.renderers
{
import mx.charts.ChartItem;
import mx.charts.renderers.CircleItemRenderer;
public class LineSeriesCustomRenderer extends CircleItemRenderer
{
public var _chartItem:ChartItem;
override public function get data():Object
{
return _chartItem;
}
override public function set data(value:Object):void
{
_chartItem = ChartItem(value);
this.visible = false;
}
public function LineSeriesCustomRenderer():void
{
super();
}
public function showRenderer(value:Boolean):void
{
//if we show this renderer instance, set it's alpha to full, if
not, set it's alpha to none and refresh display
(value) ? this.visible = true : this.visible = false;
}
}
}
Nice and simple, and provides same functionality. Same concept can be used
for ColumSeries renderer in that package too.
When it comes down to it though, multiple series and "large" datasets are
going to have performance issues. Tom's suggestion of having a "wide"
chart, and implement range selection by moving entire chart might work
(haven't tried) but would likely result in min/max axis issues I outlined in
#1 above.
The best workaround I've found is creating different aggregations of the
data being shown. A fair bit of functionality is involved in defining and
switching up the datasets, and would really only make sense for date based
datapoints. Concept would involve creating less granular datapoints
(weekly, vs daily) and show the weekly data when larger ranges are being
displayed. Shorten the range, and switch up to show daily data, and so
on... check out Google Finance for good examples on this.
I'd really be interested to hear what other folks have come up with on
solutions for this.
Brendan
On Tue, Mar 11, 2008 at 8:11 AM, Abyss Knight <[EMAIL PROTECTED]>
wrote:
> I believe you're having the same problem I ran into. Kudos to Brendan
> for the excellent example code, which it sounds like we've both made
> use of. ;) How many series are you adding to the chart? One thing I
> have noticed is that the more series, and more effects, renderers etc.
> that you add to the chart itself, the slower it gets. We're plotting
> on average, 4 series at a time as well as 3 object series (1 AS3 UI
> Component, 1 set of rectangular drawings, and a logo) on the chart
> using Ely Greenfield's chart canvas component. It does slow down as a
> function of points, but if you take off the drop shadows or remove a
> couple series or maybe thin out the points whilst zoomed out, it can
> pick up speed. Also, storing all that data in memory can really bog
> down the system. You might want to page through it, or if you are
> using AIR, store it to the internal SQLite DB for fast recall.
>
> I hope that helps,
> -- William
>
>
> --- In [email protected] <flexcoders%40yahoogroups.com>, "Nick
> Gallant" <[EMAIL PROTECTED]> wrote:
> >
> > If I have let's say 5 series, each with 10000+ data points, and I
> > scroll through them with an HSlider with 1000 points displayed on the
> > screen at a time, it gets really bogged down. It also takes a really
> > long time to load the data initially.
> >
> > I'm actually using the Google-styled chart that you developed, and it
> > works great for a couple thousand points, but when I get into really
> > big data sets, and try to scroll it, or especially when I expand the
> > slider range, it bogs down. I'm wondering what performance tricks I
> > can use to make it faster? The ones Adobe suggests don't really do much.
> >
> > Cheers,
> > Nick
> >
> >
> > --- In [email protected] <flexcoders%40yahoogroups.com>,
> "Brendan Meutzner" <bmeutzner@>
> > wrote:
> > >
> > > What do you mean by unusable? Loading and rendering over 1000
> > datapoints
> > > shouldn't be a problem for the LineChart.
> > >
> > >
> > > Brendan
> > >
> > >
> > > On Sun, Mar 9, 2008 at 3:21 PM, Nick Gallant <nick@> wrote:
> > >
> > > > I need the ability to load and display line charts with 10000+
> > points.
> > > > Does anyone know of a third-party component that can handle
> this? The
> > > > built in Flex charts become unusable after a 1000 or so points.
> > > >
> > > > Thanks,
> > > > Nick
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Brendan Meutzner
> > > http://www.meutzner.com/blog/
> > >
> >
>
>
>
--
Brendan Meutzner
http://www.meutzner.com/blog/