Hello,
I've searched the forums but couldn't find anything like this, so I apologize if this has been asked before. Our client wants a dot chart where we graph the number of days for several locations over a period of time.
The problem that we have is that some points will be directly graphed on top of each other, and the client would like to be able to see each individual location. Is it possible to spread the points to the left and right of the dates a bit so that they are still over the appropriate date, but the points do not overlap each other?
I would appreciate any help you can provide.
Overlapping Points
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi ASM,
In that case you can apply a little offset to the points doing something like this:
In that case you can apply a little offset to the points doing something like this:
Code: Select all
Option Explicit
Private Sub Form_Load()
Dim i, j As Integer
TeeCommander1.Chart = TChart1
TChart1.Aspect.View3D = False
For i = 0 To 3
TChart1.AddSeries scPoint
For j = 0 To 10
AddValue i, j, Rnd()
Next
Next
End Sub
Private Sub AddValue(ByVal SeriesIndex As Long, ByVal X As Double, ByVal Y As Double)
Dim XVal As Double
If SeriesIndex Mod 2 = 0 Then
XVal = X + (SeriesIndex / 100)
Else
XVal = X - (SeriesIndex / 100)
End If
TChart1.Series(SeriesIndex).AddXY XVal, Y, "", clTeeColor
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |