Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Chart Control
  New Posts New Posts RSS Feed - Showing average speed
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Showing average speed

 Post Reply Post Reply
Author
Message
bryanu View Drop Down
Groupie
Groupie
Avatar

Joined: 19 February 2007
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote bryanu Quote  Post ReplyReply Direct Link To This Post Topic: Showing average speed
    Posted: 14 March 2011 at 11:26am
I am using the chart to show the download speed of files beling downloaded, it show the KB or MB per second eveey 333ms, but I want to put a line that shows average speed that will move up or down.
 
I want the line to go all the way across the chart, simply move up or down to indicate the average speed.
 
Any suggestions??
 
Code for showing current speed:
 
Private Sub tmrDownloadChart_Timer()
    Dim Diagram As ChartDiagram2D
    Dim Series  As ChartSeries
    Dim Value   As Long
   
    Value = DownloadSpeed / 1024
   
    If (Value < 0) Then Value = 0
    LastValue = Value
    LastArgument = LastArgument + 1
   
    Set Series = chartDownloadSpeed.content.Series(0)
    Series.points.Add LastArgument, Value
    Set Diagram = Series.Diagram
    If (LastArgument >= 99) Then
        Series.points.DeleteAt 0
        Diagram.AxisX.Range.MaxValue = Diagram.AxisX.Range.MaxValue + 1
        Diagram.AxisX.Range.MinValue = Diagram.AxisX.Range.MinValue + 1
    End If
End Sub
 
 
Suite Pro v16.3.1

Visual Basic 6.0 ENT sp6

Windows 8.1
Back to Top
Peter59 View Drop Down
Groupie
Groupie


Joined: 19 July 2007
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote Peter59 Quote  Post ReplyReply Direct Link To This Post Posted: 14 March 2011 at 1:06pm
Hi Bryan!

Seems not to be too difficult, see ChartAxisConstantLine in help file.



But one sample is better than thousand words: uploads/3156/ChartAxisConstantLine_Demo.zip

Peter


Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6
Back to Top
bryanu View Drop Down
Groupie
Groupie
Avatar

Joined: 19 February 2007
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote bryanu Quote  Post ReplyReply Direct Link To This Post Posted: 14 March 2011 at 2:41pm
WoW!
 
I really appreciate the help Peter.  I looked at this for way too long and couldn't see the forest for the trees. The sample was perfect and I can't tell you how much I appreciate the help.
 
Regards,
 
Suite Pro v16.3.1

Visual Basic 6.0 ENT sp6

Windows 8.1
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.