Jump to content
Software FX Community

Optimizing stacked charts


bradaisa
 Share

Recommended Posts

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

Next

series += 1

Next

'Labels

i = 0

For intDate = intDateMin To intDateMax

datDate = GetDate(intDate)

.Data.Labels(i) = datDate

i += 1

Next

.Data.CommitChanges()

.ResumeLayout()

 

Thanks!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...