Strip chart what is the recomended method.

TeeChart for ActiveX, COM and ASP
Post Reply
Neutone
Newbie
Newbie
Posts: 2
Joined: Fri Nov 15, 2002 12:00 am

Strip chart what is the recomended method.

Post by Neutone » Thu Jan 03, 2008 6:00 am

I'm using version TeeChart6 and VB2008. This code is sufficient to to display a strip chart using components with default settings but I would prefer to have code that is optimized for speed as well.

Code: Select all

    Public x, y As Double
    Private Sub frmStripChart_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        AxTChart1.AddSeries(TeeChart.ESeriesClass.scLine)
        AxTChart1.Aspect.View3D = False
        AxTChart1.Axis.Bottom.Automatic = False
        AxTChart1.Axis.Bottom.AutomaticMaximum = True
        AxTChart1.Legend.Visible = False
        y = 0
        x = 0
        Timer1.Enabled = True
        Timer1.Interval = 20
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim z As Double
        y = y + 0.05
        x = x + 1
        z = Math.Sin(y)
        AxTChart1.Series(0).Add(z, "", RGB(215, 0, 0))

        AxTChart1.Axis.Bottom.Minimum = x - 1900

    End Sub
Is there a setting I should be using to automatically adjust the minimum value of the bottom axis. Is there a more appropriate method to do a strip chart?

End result I expect to display 8 analog values in real time. The faster I can get the screen to update the better. I would like to show the graph at about 1500x1000 resolution.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 03, 2008 9:15 am

Hi Neutone,

I strongly recommend you to read this article and use as many suggestions here as possible. This article is written in Delphi but almost the same can be applied to the ActiveX version.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply