2
votes

I'm using a lineseries chart, but it gets fairly slow to re-render when I add a new point when the total # of points is ~1200 points. Granted, this is running on a fairly slow PC (~600 MHz). Reading the Flex documentation on how to speed up rendering (turning off dropshadows, turning off filterData, etc...) doesnt seem to help. I bound my chart to an ArrayCollection (rather than the array I used before which I manually updated) and it doesnt seem to be any faster. Adobe's documentation seems to have me believe that the Chart looks only at what changed since the last time it was updated, but i'm only adding one point! If their info is correct, why does it take significantly longer (5 seconds) to update one point when I have ~1200 points then when I only have 2 points (instantaneous)?

FYI - When I add a new point to my ArrayCollection, I have to do a "AC.refresh()" to get the DataBinding to pick up the new data. Any ideas on what I can do to speed up the process?

2
Have you considering averaging the points to display less points on the grid then allow the user to "zoom" to a section of the grid which will display more points? Like viewing months then zooming in to the weeks in a month - Chris Klepeis

2 Answers

1
votes

Any drawing with 1200 points in flash/flex is going to perform slow when it redraws. When you add an extra point you invalidate the whole series. Once the chart is invalidated it redraws itself at the next available opportunity. This redraw will be slow. No way round this i'm afraid.

My point to you is, why do you need to display 1200 points on the chart at any one time. Anyone reaing this chart won't be able to take in all that information. If you need to be showing the trend of these points then you need to be changing the design so that it displays averages (as per Chris's comment). There are also other strategies you can use. If you take a look at the Fiat Eco Drive application we choose to only show a maximum range at any one time. So even though we could have hundreds or thousands of points, we only display a certain amount of them.

Lots of other strategies out there o deal with this and you really need to take another look at the chart design and then refactor the actual chart construction.

0
votes

almost rendering time of chart is come from rendering series so if you just change dataProvider and keep number of series, the chart will render very good from second time.