bradaisa Posted February 19, 2010 Report Share Posted February 19, 2010 We are using a Stacked Area chart to display a set of data items so the user can see the relative contributions of each set. There are around 100 or so data points in the series, and the number of series can vary from a small few to many hundreds. We observe that the graphs become extremely slow to render and to respond in the gui (ex. series highlighting) when the number of series gets large. Are there any optimization tips for getting better performance? Here is the core of our code: With chart .SuspendLayout() For Each oCDIC In cGroupedItems.Items .Series(series).Text = seriesText .Series(series).Tag = seriesTag i = 0 For Each oCI In oCDIC.Items .Data(series, i) = oCI.CountLogs i += 1 Nextseries += 1 Next 'Labelsi = 0 For intDate = intDateMin To intDateMax datDate = GetDate(intDate) .Data.Labels(i) = datDate i += 1 Next.Data.CommitChanges() .ResumeLayout() Thanks! Quote Link to comment Share on other sites More sharing options...
CarlosAC Posted February 19, 2010 Report Share Posted February 19, 2010 Hi bradaisa The performance is related to the complexity of the chart being displayed, for example a Curve chart is much slower than a Line chart, Circle markers are slower than Squared ones, in general, we depend on the performance of GDI+ so the performance of the chart depends a great deal of the performance of the GDI+ primitives used. Also, you should refrain from making extensive use of the features geared towards achieving a cosmetic effect on the chart. Particularly, features like Borders, Transparency and Gradients which heavily use the system graphical API as a way to improve the way charts look. -- Pipon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.