how can I improve the performance of the chart with fastline
Posted: Sat Mar 23, 2013 9:57 am
Hello,
I have already asked the question on stack overflow. but comments were getting long , so I am posting the question here.
http://stackoverflow.com/questions/1551 ... rt-refresh
I have 16 graphs[maximum ] with 4 fastlines in each graph. In each graph 3 fastlines represent min , max and ideal value. 4th fastline is actual values from the hardware. I have to run the test for 18,000 samples. So , first 3 fastlines are already drawn and when the switch is on and data comes in , 4th fastline is drawn. In order to draw the 4th line, I use the method Series4.Add(actualvalue, "" , color.red) . here is the problem. each time the sample is drawn on 4th line. chart has to be refreshed in order to view the plotting of that sample. that also redraws the other 3 fastlines with 18,000 samples in each . so it redraws that many samples without use again and again. I need to draw only 4th fastline. I can not use an array to fill the values up and then assign it as a source of fastline because I dont have any values beforehand. I tried series4.repaint() method and series4.refreshseries() method, but that doesnt repaint 4th series actually. we have to refresh the whole chart. and therefore, it slows down the performance because of high number of samples in each fastline [18,000] and one graph with 4 fastlines and total 16 graphs like this.
I ve already done Series4.AutoRepaint = false, Series4.DrawAllPoints = false; Series4.XValues.Order = ValueListOrder.None , Series4.YValues.Order = ValueListOrder.None
Is there any way I can increase the performance ?I can not make other 3 lines invisible. I would want to see position of the 4th line in real time with min max and ideal limits. so after making them invisible, it draws at an excellent speed. but i can not hide other 3 lines. so, I can not do fastline.visible= false and fastline.active= false. seems like active and visible serve the same purpose. is there a way i can use fastline.draw() , fastline.repaint(), fastline.refreshseries() to update only 4th line [ without doing chart.refresh] ?
i did this in order to implement direct2d. no improvements.am I missing anything?
Chart1.Graphics3D = new Graphics3DDirect2D(Chart1.Chart);
Chart1.Aspect.TextRenderingHint =TextRenderingHint.SingleBitPerPixel;
Chart1.Aspect.SmoothingMode = SmoothingMode.HighSpeed;
Chart1.Graphics3D.BufferStyle = BufferStyle.None;
Chart1.Graphics3D.SupportsID=false;
Chart1.Graphics3D.Supports3DText=false;
Chart1.Graphics3D.TextRenderingHint= TextRenderingHint.SingleBitPerPixel;
Chart1.Graphics3D.SmoothingMode = SmoothingMode.HighSpeed;
here is the link to my project .
https://www.dropbox.com/s/k8mbd4hcqd2vp6u/Pro.zip
Please go through the read me file first.you will have to add teechart and slimdx references in the project.
I have made a project in the way that chart is a child window. so you can do all the modifications in childwin.cs and its designer. main file gets the data from demo file and save it into array and includes timer.
for the large number of samples, if you make other 3 series visible= false, active = false, then performance will improve and transition will be smooth. but certainly I want smooth transition without hiding other series.
Thanks !
I have already asked the question on stack overflow. but comments were getting long , so I am posting the question here.
http://stackoverflow.com/questions/1551 ... rt-refresh
I have 16 graphs[maximum ] with 4 fastlines in each graph. In each graph 3 fastlines represent min , max and ideal value. 4th fastline is actual values from the hardware. I have to run the test for 18,000 samples. So , first 3 fastlines are already drawn and when the switch is on and data comes in , 4th fastline is drawn. In order to draw the 4th line, I use the method Series4.Add(actualvalue, "" , color.red) . here is the problem. each time the sample is drawn on 4th line. chart has to be refreshed in order to view the plotting of that sample. that also redraws the other 3 fastlines with 18,000 samples in each . so it redraws that many samples without use again and again. I need to draw only 4th fastline. I can not use an array to fill the values up and then assign it as a source of fastline because I dont have any values beforehand. I tried series4.repaint() method and series4.refreshseries() method, but that doesnt repaint 4th series actually. we have to refresh the whole chart. and therefore, it slows down the performance because of high number of samples in each fastline [18,000] and one graph with 4 fastlines and total 16 graphs like this.
I ve already done Series4.AutoRepaint = false, Series4.DrawAllPoints = false; Series4.XValues.Order = ValueListOrder.None , Series4.YValues.Order = ValueListOrder.None
Is there any way I can increase the performance ?I can not make other 3 lines invisible. I would want to see position of the 4th line in real time with min max and ideal limits. so after making them invisible, it draws at an excellent speed. but i can not hide other 3 lines. so, I can not do fastline.visible= false and fastline.active= false. seems like active and visible serve the same purpose. is there a way i can use fastline.draw() , fastline.repaint(), fastline.refreshseries() to update only 4th line [ without doing chart.refresh] ?
i did this in order to implement direct2d. no improvements.am I missing anything?
Chart1.Graphics3D = new Graphics3DDirect2D(Chart1.Chart);
Chart1.Aspect.TextRenderingHint =TextRenderingHint.SingleBitPerPixel;
Chart1.Aspect.SmoothingMode = SmoothingMode.HighSpeed;
Chart1.Graphics3D.BufferStyle = BufferStyle.None;
Chart1.Graphics3D.SupportsID=false;
Chart1.Graphics3D.Supports3DText=false;
Chart1.Graphics3D.TextRenderingHint= TextRenderingHint.SingleBitPerPixel;
Chart1.Graphics3D.SmoothingMode = SmoothingMode.HighSpeed;
here is the link to my project .
https://www.dropbox.com/s/k8mbd4hcqd2vp6u/Pro.zip
Please go through the read me file first.you will have to add teechart and slimdx references in the project.
I have made a project in the way that chart is a child window. so you can do all the modifications in childwin.cs and its designer. main file gets the data from demo file and save it into array and includes timer.
for the large number of samples, if you make other 3 series visible= false, active = false, then performance will improve and transition will be smooth. but certainly I want smooth transition without hiding other series.
Thanks !