Page 1 of 1

Problems when showing labels in marks

Posted: Fri Jul 23, 2004 9:59 am
by 8121155
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.

Posted: Fri Jul 23, 2004 5:34 pm
by Pep
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 ?

Posted: Mon Jul 26, 2004 1:52 am
by 8121155
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

Posted: Mon Jul 26, 2004 2:31 am
by 8121155
Hi, Pep

I try to use the event handler: TChart_ClickSeries to find out the label.
The points' labels are empty when the points show Y values instead of labels.

Posted: Tue Jul 27, 2004 12:25 pm
by Chris
Hi Albert,
How can I make all points show their "label" in marks.
Does the following code work at your end?

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

Posted: Wed Jul 28, 2004 4:33 am
by 8121155
Hi, Chris

It does work.

But the problem is still there when I use my own code.

Posted: Wed Jul 28, 2004 5:34 am
by 8121155
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

Posted: Wed Jul 28, 2004 7:27 am
by Pep
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.