Bottom Labels Overlapping
Posted: Fri Nov 05, 2004 5:49 pm
I have installed the latest version of TeeChart.Net Nov 2004. I was waiting for this release so the year labels would relate to the data. This is done and it looks great. Now my problem is the lables overlap when a large number of years are displayed.
Is there a way to display say every fifth label. The Grid is fine on Yearly incraments. Tried 'TChart1.Axes.Bottom.Labels.Separation ' didn't work.
TChart1.Axes.Bottom.Labels.DateTimeFormat = "yy" is still to crowded and TChart1.Axes.Bottom.Labels.Angle = 90 is not an option.
if I drop TChart1.Axes.Bottom.Increment = Steema.TeeChart.Utils.GetDateTimeStep(Steema.TeeChart.DateTimeSteps.OneYear) It looks OK but again the labels would not relate to the data.
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim StartDate As New DateTime(1962, 1, 1)
Dim PointDate As New DateTime(1962, 1, 1)
Dim x As Single
Dim EnderDate As New DateTime(2010, 1, 1)
TChart1.Legend.Visible = False
For i As Integer = 1 To 360
x = x + Rnd()
Line1.Add(PointDate, x, "")
PointDate = PointDate.AddMonths(1)
Next
Line1.XValues.DateTime = True
TChart1.Axes.Bottom.Automatic = False
TChart1.Axes.Bottom.Labels.Separation = 10
TChart1.Axes.Bottom.Increment = Steema.TeeChart.Utils.GetDateTimeStep(Steema.TeeChart.DateTimeSteps.OneYear)
TChart1.Axes.Bottom.Labels.DateTimeFormat = "yyyy"
TChart1.Axes.Bottom.SetMinMax(StartDate, EnderDate)
End Sub
Thanks
Is there a way to display say every fifth label. The Grid is fine on Yearly incraments. Tried 'TChart1.Axes.Bottom.Labels.Separation ' didn't work.
TChart1.Axes.Bottom.Labels.DateTimeFormat = "yy" is still to crowded and TChart1.Axes.Bottom.Labels.Angle = 90 is not an option.
if I drop TChart1.Axes.Bottom.Increment = Steema.TeeChart.Utils.GetDateTimeStep(Steema.TeeChart.DateTimeSteps.OneYear) It looks OK but again the labels would not relate to the data.
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim StartDate As New DateTime(1962, 1, 1)
Dim PointDate As New DateTime(1962, 1, 1)
Dim x As Single
Dim EnderDate As New DateTime(2010, 1, 1)
TChart1.Legend.Visible = False
For i As Integer = 1 To 360
x = x + Rnd()
Line1.Add(PointDate, x, "")
PointDate = PointDate.AddMonths(1)
Next
Line1.XValues.DateTime = True
TChart1.Axes.Bottom.Automatic = False
TChart1.Axes.Bottom.Labels.Separation = 10
TChart1.Axes.Bottom.Increment = Steema.TeeChart.Utils.GetDateTimeStep(Steema.TeeChart.DateTimeSteps.OneYear)
TChart1.Axes.Bottom.Labels.DateTimeFormat = "yyyy"
TChart1.Axes.Bottom.SetMinMax(StartDate, EnderDate)
End Sub
Thanks