Jump to content
Software FX Community

Display of Chart seems very slow


Recommended Posts

I have a simple line chart on a tab control. Data is loaded into the chart before the user chooses that tab. When I click on that tab it takes the chart 5-6 seconds to display. Huh????

Data is bound to the chart using an ArrayList which contains Arrays, one array for each set of X values and one array for the Y values. I have 10 X/Y pairs all together with about 2500 points in each. This is just test data. The datasets will have around 20,000 data points.

But I'm not convinced its the data.

Once the chart has finally painted after i've clicked on the tab. I click to another tab and then immediatly click the tab with ChartFx on it. The data is NOT reloaded when this happens but it still takes 5-6 seconds for the chart to paint.

 I've changed almost none of default properties.

 any ideas what's going on?







Link to comment
Share on other sites

Well it all depends on your chart settings. It is not passing the data what takes time but painting so many points.

2500 x 10 = 25,000 points

Depending on the settings like gallery type, marker shape, etc. 5-6 seconds may be what it takes to draw it.

Some properties to look at that affect performance significantly:

- Gallery type

- View3D settings

- MarkerShape

- PointLabels and PointLabelOrganizer


Link to comment
Share on other sites

Gallery type is Line

 Haven't changed the View3D settings but am not viewing in 3D.

 MarkerShape was Marble. I assume None is fastest? Are there differences in speed with the others? I wanted the marker smaller and thought I had set it to the smallest but just noticed it was set to 2. Does that affect the speed?

 I haven't changed PointLabels or PointLabelOrganizer from the defaults. Anything to change to speed things up?

 The number of points is going to increase by at least a factor of 10. I'm worried. Will things speed up by using MarkerStep? It is going to get to the point where that displaying more points makes the lines harder to read.






Link to comment
Share on other sites

MarkerShape of marble is the least performant. None is the most performant. The size does matter in this case :-)

Having so many points you probably don't want to show a marker for each one, otherwise the will just cram up on top of each other. Use the MarkerStep property to draw markers for every n-th point. This will also improve your performance.

PointLabelsOrganizer is off by default, so just leave it alone.

You need to experiment with the different settings to reach a compromise between looks and performance. In any case, drawing 250,000 points is always going to take some time it is not realistic to expect an immediate repaint on a 250K points chart.

You may also want to consider adding scrolling (AxisX.AutoScroll = true) to display only part of your data at a time.

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.

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.

  • Create New...