Jump to content
Software FX Community

Display of Chart seems very slow


mhowes

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?

thanks

mike

 

 

 

  

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.

thanks

mike

 

 

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...