One point plotting on top of another
One point plotting on top of another
I have a point series that has two points with the same x and y value. When they are plotted they are plotted on top of each other. I would like to be able to tell there are two points there, so I would like the one on the bottom to big bigger in diameter. I am using circles, vb.net, tchart version 1.1.2004.16592. I would love to upgrade to the latest tchart, but since there are 3 developers, I can only upgrade when the other developers upgrade.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi John,
In v1 you can do this:
In v1 you can do this:
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Points points1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
points1.ColorEach = true;
points1.Pointer.VertSize = 5;
points1.Pointer.HorizSize = 5;
points1.Add(1, 1);
points1.Add(1, 1);
points1.GetPointerStyle += new Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventHandler(points1_GetPointerStyle);
}
void points1_GetPointerStyle(Steema.TeeChart.Styles.CustomPoint series, Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventArgs e)
{
if (e.ValueIndex == 1)
{
series.Pointer.VertSize = 3;
series.Pointer.HorizSize = 3;
}
}
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 |
The point that I want to find is not the first point
This works great if you only have the two points. However, the point I want to find is not the first point, but towards the middle. I have included the sample program that I am using to try and find the correct point. What am I doing wrong?
Thanks!
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim points1 As New Steema.TeeChart.Styles.Points
Dim line1 As New Steema.TeeChart.Styles.Line
' points1.ColorEach = True
points1.Pointer.VertSize = 5
points1.Pointer.HorizSize = 5
points1.Add(2, 5620)
points1.Add(2, 5910)
points1.Add(2, 5890)
points1.Add(3, 3840)
points1.Add(3, 3920) ' this is the point that should be bigger
points1.Add(3, 3920)
points1.Add(4, 5720)
points1.Add(4, 5550)
points1.Add(4, 5510)
points1.Add(5, 5190)
points1.Add(5, 5170)
points1.Add(5, 5110)
points1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
line1.Add(2, 5620)
line1.Add(2, 5910)
line1.Add(2, 5890)
line1.Add(3, 3840)
line1.Add(3, 3920)
line1.Add(3, 3920)
line1.Add(4, 5720)
line1.Add(4, 5550)
line1.Add(4, 5510)
line1.Add(5, 5190)
line1.Add(5, 5170)
line1.Add(5, 5110)
TChart1.Series.Add(points1)
TChart1.Series.Add(line1)
AddHandler points1.GetPointerStyle, AddressOf GetPointerStyle
End Sub
Private Sub GetPointerStyle(ByVal series As Steema.TeeChart.Styles.CustomPoint, ByVal e As Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventArgs)
If (e.ValueIndex = 1) Then
series.Pointer.VertSize = 3
series.Pointer.HorizSize = 3
End If
End Sub
End Class
Thanks!
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim points1 As New Steema.TeeChart.Styles.Points
Dim line1 As New Steema.TeeChart.Styles.Line
' points1.ColorEach = True
points1.Pointer.VertSize = 5
points1.Pointer.HorizSize = 5
points1.Add(2, 5620)
points1.Add(2, 5910)
points1.Add(2, 5890)
points1.Add(3, 3840)
points1.Add(3, 3920) ' this is the point that should be bigger
points1.Add(3, 3920)
points1.Add(4, 5720)
points1.Add(4, 5550)
points1.Add(4, 5510)
points1.Add(5, 5190)
points1.Add(5, 5170)
points1.Add(5, 5110)
points1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
line1.Add(2, 5620)
line1.Add(2, 5910)
line1.Add(2, 5890)
line1.Add(3, 3840)
line1.Add(3, 3920)
line1.Add(3, 3920)
line1.Add(4, 5720)
line1.Add(4, 5550)
line1.Add(4, 5510)
line1.Add(5, 5190)
line1.Add(5, 5170)
line1.Add(5, 5110)
TChart1.Series.Add(points1)
TChart1.Series.Add(line1)
AddHandler points1.GetPointerStyle, AddressOf GetPointerStyle
End Sub
Private Sub GetPointerStyle(ByVal series As Steema.TeeChart.Styles.CustomPoint, ByVal e As Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventArgs)
If (e.ValueIndex = 1) Then
series.Pointer.VertSize = 3
series.Pointer.HorizSize = 3
End If
End Sub
End Class
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi John,
In that case you can do this:
In that case you can do this:
Code: Select all
Dim index As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim points1 As New Steema.TeeChart.Styles.Points
Dim line1 As New Steema.TeeChart.Styles.Line
' points1.ColorEach = True
points1.Pointer.VertSize = 5
points1.Pointer.HorizSize = 5
points1.Add(2, 5620)
points1.Add(2, 5910)
points1.Add(2, 5890)
points1.Add(3, 3840)
index = points1.Add(3, 3920) ' this is the point that should be bigger
points1.Add(3, 3920)
points1.Add(4, 5720)
points1.Add(4, 5550)
points1.Add(4, 5510)
points1.Add(5, 5190)
points1.Add(5, 5170)
points1.Add(5, 5110)
points1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
line1.Add(2, 5620)
line1.Add(2, 5910)
line1.Add(2, 5890)
line1.Add(3, 3840)
line1.Add(3, 3920)
line1.Add(3, 3920)
line1.Add(4, 5720)
line1.Add(4, 5550)
line1.Add(4, 5510)
line1.Add(5, 5190)
line1.Add(5, 5170)
line1.Add(5, 5110)
TChart1.Series.Add(points1)
TChart1.Series.Add(line1)
AddHandler points1.GetPointerStyle, AddressOf GetPointerStyle
End Sub
Private Sub GetPointerStyle(ByVal series As Steema.TeeChart.Styles.CustomPoint, ByVal e As Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventArgs)
If (e.ValueIndex = index) Then
series.Pointer.VertSize = 5
series.Pointer.HorizSize = 5
Else
series.Pointer.VertSize = 3
series.Pointer.HorizSize = 3
End If
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 |