Jump to content
Software FX Community

Repainting of chart is slow


wuttrain
 Share

Recommended Posts

Hi,

  I noticed that repainting of the chart is really slow and freezes my form while it's repainting.  I believe I have more than 200,000 points plotted to the chart.  Here is what I did, when I queried the data, I put the query process and setting of the data source in a thread.  The querying process seems to work, so threading is working but when loading the table to this (in the same thread): Me.Chart1.DataSource = [dataTable], it seems to freeze the screen, it then releases it when it's done.  Is there a work around to this?  My application has MDI windows and each window has charts that need to refresh every 5-10 minutes, and the refresh issue is going to kill my app.

 Thanks!

wuttrain

 

 

Link to comment
Share on other sites

Like any Windows Form control, Chart FX is single threaded. You can't set any chart property from any thread other than the UI thread.

You need to determine whether this time is spent reading the data or painting the chart by measuring how long does chart.DataSource = [dataTable] takes to return.

 If the time is beign spent during data loading, check the structure  of your data to make sure it is optimal.

If the time is beign spent during paint, the only thing you can do is simplify your chart so that it takes less CPU.

Here are some pointers to improve the performance of your chart during paint:

- If using a chart with markers, consider eliminating the markers or chosing a less complex marker (Rect is the fastest).

- Use 2D over 3D

- Consider scrolling

- Avoid PointLabelOrganizer

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...