By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,512 Members | 3,847 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,512 IT Pros & Developers. It's quick & easy.

ChartFX Slowness

P: n/a
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

Jun 6 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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:
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


Jun 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.