Print Page | Close Window

Showing average speed

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Chart Control
Forum Description: Topics Related to Codejock Chart Control
URL: http://forum.codejock.com/forum_posts.asp?TID=18053
Printed Date: 29 April 2024 at 9:16am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Showing average speed
Posted By: bryanu
Subject: Showing average speed
Date 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



Replies:
Posted By: Peter59
Date 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 - 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


Posted By: bryanu
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net