I had tried to show labels of points in marks, but there is a problem.
Here is part of my code:
Dim PosX,PosY as Double
Dim Labels as String
...
Point1.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Label
...
<For Loop>
Point1.add(PosX,PosY,Labels)
...
I added a lot of points, but some points' marks showed the Y values instead of the labels.
How can I make all points show their "label" in marks.
Thanks in advance.
Problems when showing labels in marks
Hi Albert,
it works fine using the latest build available for download on our web site, at the private customers download page. Could you please post the code you're using so I can reproduce the problem here ?
it works fine using the latest build available for download on our web site, at the private customers download page. Could you please post the code you're using so I can reproduce the problem here ?
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 16
- Joined: Fri Nov 15, 2002 12:00 am
- Location: Taipei, Taiwan, Republic of China
- Contact:
Hi Pep, here is my function code:
Private Function ShowPoints(ByRef DT As DataTable, ByVal SysName As String)
Dim Rows As DataRow()
Dim PR As DataRow()
Dim i As New Integer
Rows = DT.Select("SysName='" + SysName + "'")
For i = 0 To Rows.Length - 1
If CStr(Rows(i).Item("Flag"))=1 < 0 Then
PR = ProDS.Tables("WTP").Select("PointID='" + Rows(i).Item("ChildredID") + "'")
If PR.Length <> 0 Then
WTPPoint.Add(PR(0).Item("PosX"), PR(0).Item("PosY"),PR(0).Item("PointName"))
End If
End If
Next
End Function
'------------------------------------------------------------------------------
'DT table contains 2 rows : 'SysName', 'ChildrenID'
'ProDS.Tables('WTP') table contains 4 rows : 'PointID','PointName', 'PosX', 'PosY'
'where those data is fetched from my database
'And the SysName and PointName are Chinese
Private Function ShowPoints(ByRef DT As DataTable, ByVal SysName As String)
Dim Rows As DataRow()
Dim PR As DataRow()
Dim i As New Integer
Rows = DT.Select("SysName='" + SysName + "'")
For i = 0 To Rows.Length - 1
If CStr(Rows(i).Item("Flag"))=1 < 0 Then
PR = ProDS.Tables("WTP").Select("PointID='" + Rows(i).Item("ChildredID") + "'")
If PR.Length <> 0 Then
WTPPoint.Add(PR(0).Item("PosX"), PR(0).Item("PosY"),PR(0).Item("PointName"))
End If
End If
Next
End Function
'------------------------------------------------------------------------------
'DT table contains 2 rows : 'SysName', 'ChildrenID'
'ProDS.Tables('WTP') table contains 4 rows : 'PointID','PointName', 'PosX', 'PosY'
'where those data is fetched from my database
'And the SysName and PointName are Chinese
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi Albert,
Does the following code work at your end?How can I make all points show their "label" in marks.
Code: Select all
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim i As Integer
For i = 0 To 10
Line1.Add(i, Rnd() * 100, Chr(65 + i))
Next
Line1.Marks.Visible = True
Line1.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Label
End Sub
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
-
- Newbie
- Posts: 16
- Joined: Fri Nov 15, 2002 12:00 am
- Location: Taipei, Taiwan, Republic of China
- Contact:
Hi, Chris
Please try this code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim i As Integer
Dim SX(6) As Double
Dim SY(6) As Double
Dim SN(6) As String
SX(0) = 19.2
SY(0) = 67.5
SX(1) = 38.6
SY(1) = 69.5
SX(2) = 64.5
SY(2) = 68.5
SX(3) = 84
SY(3) = 63
SX(4) = 26
SY(4) = 14
SX(5) = 53
SY(5) = 19
SX(6) = 79.5
SY(6) = 15.5
SN(0) = "SN0"
SN(1) = "SN1"
SN(2) = "SN2"
SN(3) = "SN3"
SN(4) = "SN4"
SN(5) = "SN5"
SN(6) = "SN6"
For i = 0 To 6
Points1.Add(SX(i), SY(i), SN(i))
Next
Points1.Marks.Visible = True
Points1.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Label
End Sub
Best Regards
Please try this code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim i As Integer
Dim SX(6) As Double
Dim SY(6) As Double
Dim SN(6) As String
SX(0) = 19.2
SY(0) = 67.5
SX(1) = 38.6
SY(1) = 69.5
SX(2) = 64.5
SY(2) = 68.5
SX(3) = 84
SY(3) = 63
SX(4) = 26
SY(4) = 14
SX(5) = 53
SY(5) = 19
SX(6) = 79.5
SY(6) = 15.5
SN(0) = "SN0"
SN(1) = "SN1"
SN(2) = "SN2"
SN(3) = "SN3"
SN(4) = "SN4"
SN(5) = "SN5"
SN(6) = "SN6"
For i = 0 To 6
Points1.Add(SX(i), SY(i), SN(i))
Next
Points1.Marks.Visible = True
Points1.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Label
End Sub
Best Regards
Hi Albert,
yes, you're correct, it seems to be a bug. I've added on our defect list to be reviewed and fixed for the next maintenance releases.
yes, you're correct, it seems to be a bug. I've added on our defect list to be reviewed and fixed for the next maintenance releases.
Pep Jorge
http://support.steema.com
http://support.steema.com