user3642115
user3642115

Reputation: 15

C# chart control Performance with large amounts of data

I am using a chart control with a range bar graph to basically make a gantt chart for lots of people and lots of projects, say about 1000 total series.

The issue that I am running in to is that once I have all my data added to the chart, which takes some time but that is to be expected, and I go to scroll down on my graph it freezes the whole application and takes a while before it unfreezes and scrolls down.

Is there any way to improve the performance of this? I tried adding the graph to a panel and growing the graph size dynamically and then scrolling down from the panel but that cause a whole plethora of other issues.

Any tips for speeding this up? I don't think it is my code as it has already finished running when this issue happens.

Thanks.

Upvotes: 1

Views: 2629

Answers (2)

mmathis
mmathis

Reputation: 1610

You need to reduce the number of points being plotted, there is no way around that. You can try setting the DoubleBuffered property of the chart / window which may help a little, but the underlying problem won't go away. The chart has built in features for drilling down if that's appropriate for your use, or you can write your own method for scaling down the number of points. I've run into this same issue (though with scatter plots), and found that performance starts to degrade significantly when plotting more than ~25k points (I started with 600k, and scaled down). Even then, performance is still sluggish.

Upvotes: 1

Qash
Qash

Reputation: 167

Perhaps you can give it fewer points at the high level, say 1 point every 10, and once the users zooms in, or gives a smaller range, give more granular points to show. That's how Google Finance does it.

Upvotes: 1

Related Questions