Jump to content
Software FX Community

How can I improve surface chart display efficiency?


daoning

Recommended Posts

Hello, I don't know what happened, my question didn't display. About surface chart in Chartfx for 2005, I need use surface chart with 40 thousand points and refresh it per 5 seconds. (computer is 2.8G CPU, 1G memory, 256M Display Card) In my attempt, chartfx build so surface chart using above 30 seconds. My code is refer to help files and set each point value in loop.How many times does Chartfx spend displaying 40 thousand poins in surface chart?How to improve surface chart display efficiency?Thanks. I look forward to your reply.

Link to comment
Share on other sites

Well this all depends.

Usually, 40,000 will take some time to draw, specially in any 3D chart.

Setting the data and painting the chart are two different things. You can measure the time you are consuming passing the data very easily since this is in your code. Unless your code is inherently slow, passing data is not usually a performance bottleneck in Chart FX.

I wrote the following sample code to create a 40,000 surface chart. The code executes immediately (93 ms) However the chart takes about 8 secs to draw in my computer at full screen size:

chart1.Gallery =

Gallery.Surface;chart1.View3D.Enabled = true;

chart1.AxisY.ResetScale();

int n = 200;

chart1.Data.Series = n;

chart1.Data.Points = n;

for (int i = 0; i < n; i++) {

 for (int j = 0; j < n; j++) {  chart1.Data[i,j] = Math.Sin((i * 3*Math.PI)/n) * Math.Cos((j * 3*Math.PI)/n) * 100;

 }

}

There is not much you can do to improve this paint performance.

Some gains can be obtained by reducing the number of color levels. For example, in my code you can add:

((

Surface) chart1.GalleryAttributes).Step = 50;

Reducing the amount of points by compacting your data is the path that will provide the higher performance gains 

 

AjaxSample.zip

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...