|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ChartFX SlownessI have a slight problem when using chartfx in vb.net. I have a line graph that needs to be able to plot 10,000 points. I believe that this isn't too unfeasible however whenever I begin plotting the points it slows down immensely. If i Alt-Tab to another full screen application and then Alt-Tab back a few seconds later, the graph has redrawn a lot more of it that it would have had it been on the screen all the time. This leads me to believe that it is due to the graph refreshing every point whenever a new one is added. At my calculations that would mean in total, the number of points actually plotted for a 10,000 point graph is around 42 million! 10000 + 9999 + 9998 + ... etc. Is there anyway around this so that the graph will only draw on the last point added? The code snippet i am using is below: For i As Integer = 0 To 10000 - 1 chtChart.OpenData(SoftwareFX.ChartFX.COD.XValues Or SoftwareFX.ChartFX.COD.AllocHidden, SeriesCount, 10000) chtChart.OpenData(SoftwareFX.ChartFX.COD.Values Or SoftwareFX.ChartFX.COD.AllocHidden, SeriesCount, 10000) 'plot the point chtChart.Value(SeriesCount - 1, i) = y chtChart.XValue(SeriesCount - 1, i) = x chtChart.Series(SeriesCount - 1).Tag = sp.scan.sampleName Dim str As String = "" str = "x: " & x.ToString("N1") & vbCrLf str += "y: " + y.ToString("N3") chtChart.Point(SeriesCount - 1, i).Tag = str 'Close the chart control for data chtChart.CloseData(SoftwareFX.ChartFX.COD.Values) chtChart.CloseData(SoftwareFX.ChartFX.COD.XValues) Next Check the programmer's guide under "Real Time Charts", there is API
there that will help you improve the prformance of this chart, among the things you cna do is to "add" one point to the chart and refresh only the new point. Dave wrote: Show quoteHide quote > Hi all, > > I have a slight problem when using chartfx in vb.net. I have a line > graph that needs to be able to plot 10,000 points. I believe that this > isn't too unfeasible however whenever I begin plotting the points it > slows down immensely. If i Alt-Tab to another full screen application > and then Alt-Tab back a few seconds later, the graph has redrawn a lot > more of it that it would have had it been on the screen all the time. > > This leads me to believe that it is due to the graph refreshing every > point whenever a new one is added. At my calculations that would mean > in total, the number of points actually plotted for a 10,000 point > graph is around 42 million! 10000 + 9999 + 9998 + ... etc. > > Is there anyway around this so that the graph will only draw on the > last point added? The code snippet i am using is below: > > For i As Integer = 0 To 10000 - 1 > > chtChart.OpenData(SoftwareFX.ChartFX.COD.XValues Or > SoftwareFX.ChartFX.COD.AllocHidden, SeriesCount, 10000) > > chtChart.OpenData(SoftwareFX.ChartFX.COD.Values Or > SoftwareFX.ChartFX.COD.AllocHidden, SeriesCount, 10000) > > 'plot the point > chtChart.Value(SeriesCount - 1, i) = y > chtChart.XValue(SeriesCount - 1, i) = x > chtChart.Series(SeriesCount - 1).Tag = sp.scan.sampleName > > Dim str As String = "" > str = "x: " & x.ToString("N1") & vbCrLf > str += "y: " + y.ToString("N3") > > chtChart.Point(SeriesCount - 1, i).Tag = str > > 'Close the chart control for data > chtChart.CloseData(SoftwareFX.ChartFX.COD.Values) > chtChart.CloseData(SoftwareFX.ChartFX.COD.XValues) > Next
How do you get to this newsgroup quickly, AND STAY HERE?
why is dataAdapter.UpdateCommand not updating? How can you convert an integer into a VB.NET color? Label problem How to call BeginInvoke for a sub that has a parameter ? Define an object??? Requesting advice: shared properties vs other class interactions. Use a System.Type in Generics? Newbie needs help with datagrid create csv file |
|||||||||||||||||||||||