teechart series marks

TeeChart for ActiveX, COM and ASP
Post Reply
Oblicore
Newbie
Newbie
Posts: 79
Joined: Fri May 27, 2005 4:00 am

teechart series marks

Post by Oblicore » Wed May 31, 2006 9:02 am

we have a chart with 3 series
series are stacked: "stacked"
we set lables to visible on the first series (the one at the bottom of the chart) (we do it using the properties popup but i think its the same as chart->series[0]->marks->visible = true or something like that).

problem is, the top 2 series hide the marks.
changing the order of the series will put the wrong series on top in the atck.
setting "visible to all series" only adds marks to the series does not fix the marks that we want to see

3 questions:
1. is there a way to set somethink like "always on top" to the marks
2. is there a way to set it that the marks will be apositioned t the top of ?the stack ignoring which series it belongs to?
3. is there a way to create such a mark that sums up the whole stack?

thanks
Zoe K.
Oblicore.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed May 31, 2006 9:34 am

Hi Zoe,

Yes, this is by default for Stacked 2D Bar Series, we've on our wish list to be considered for further releases. As workarounds:
  • 1) Use the DragMarks tool
    2) Set a different arrow length for the Marks of each Series. (setting the ArrowLength to negative value).
    3) Placing custom markers, for example using Annotation tools.
1. is there a way to set somethink like "always on top" to the marks
This is not available for now.
2. is there a way to set it that the marks will be apositioned t the top of ?the stack ignoring which series it belongs to?


You can do that setting custom marks positions, i.e.:

Code: Select all

Private Sub Form_Load()
    TeeCommander1.Chart = tc
    tc.Axis.Left.SetMinMax 50, 130
    
    For i = 0 To tc.SeriesCount - 1
        With tc.Series(i)
            For j = 0 To 20
                'We populate the series with random values ranging from 40 to 150
                .Add ((150 - 40 + 1) * Rnd + 40), "", clTeeColor
            Next j
            
            For ii = 0 To .Count - 1
                If (.YValues.Value(ii) > tc.Axis.Left.Maximum) Then
                    tc.Environment.InternalRepaint
                    yValue = .CalcYPosValue(tc.Axis.Left.Maximum - 5)
                    .Marks.Positions.Position(ii).Custom = True
                    .Marks.Positions.Position(ii).LeftTop.Y = yValue
                    .Marks.Arrow.Visible = False
                Else
                    If (.YValues.Value(ii) < tc.Axis.Left.Minimum) Then
                        tc.Environment.InternalRepaint
                        yValue = .CalcYPosValue(tc.Axis.Left.Minimum + 5)
                        .Marks.Positions.Position(ii).Custom = True
                        .Marks.Positions.Position(ii).LeftTop.Y = yValue
                        .Marks.Arrow.Visible = False
                    End If
                End If
            Next ii
'            .Marks.Clip = True
        End With
    Next i
    
    tc.Repaint
End Sub
3. is there a way to create such a mark that sums up the whole stack?
Yes, you can add an Add function to the chart and you can make the brush and pen of the series representing the function not visible. For more information about functions please read Tutorial 7 - Working with Functions. You'll find the tutorials at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Oblicore
Newbie
Newbie
Posts: 79
Joined: Fri May 27, 2005 4:00 am

thanks

Post by Oblicore » Wed May 31, 2006 10:13 am

thanks

Post Reply