1

I have written the following VB.NET code which plots standard scores as a function of date and time on a Windows form.

Public Sub PopulateChart(ByVal PairId As Integer, ByVal SymbolA As String, ByVal SymbolB As String)
    Dim DateTimes As List(Of DateTime)
    Dim StandardScores As List(Of Double)
    Me.Visible = True
    Me.BringToFront()
    Me.Text = SymbolA & " " & SymbolB
    graStandardScores.Series("StandardScores").Points.Clear()
    DateTimes = GetStandardScoreDates(PairId)
    StandardScores = GetStandardScores(PairId)
    For i = 0 To StandardScores.Count - 1
        If Double.IsInfinity(StandardScores(i)) = False Then
            graStandardScores.Series("StandardScores").Points.AddXY(DateTimes(i), StandardScores(i))
        End If
    Next i
End Sub

Each point is thirty seconds apart and the data span multiple days. I would like only one label for each day to be displayed on the x-axis, but also a label for each hour of the day. What is the best way to accomplish this?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.