Page 1 of 1

Data points in margin (multi-page chart)

Posted: Wed Oct 25, 2006 3:53 pm
by 9526464
I have a recurring problem with the label of data points on the next page of a multi-page report showing up in the margin of the previous page. Is there a way to prevent this from happening? I sent in a sample .tee file showing this effect to the attachments newsgroup.

Thanks,
- James

Posted: Thu Oct 26, 2006 8:17 am
by narcis
Hi James,

Thanks for the attachment but I can't reproduce the problem here. Actually, when loading the file I see a blank form. Is there any special step I should follow to reproduce the issue here or there is a problem with the file you attached. Could you please check it?

Thanks in advance.

Posted: Fri Oct 27, 2006 2:42 am
by 9526464
Not sure why this is necessary, but to get the chart to show up, toggle the Visible property:

TChart1.Import.LoadFromFile filename
TChart1.Visible = False
TChart1.Visible = True

- James

Posted: Fri Oct 27, 2006 8:20 am
by narcis
Hi James,

It's really strange, we should see how the chart is created and which properties are used to be able to guess what's happening here. However, I've been able to see the chart now. I'm not 100% sure of which is your exact problem but you could try clipping the series marks using this code:

Code: Select all

    For i = 0 To TChart1.SeriesCount - 1
        TChart1.Series(i).Marks.Clip = True
    Next
Does this solve your problem?

Posted: Mon Oct 30, 2006 3:46 am
by 9526464
Thank you, your suggestion worked. For your reference, here is the code that I use to create the series for which the Marks.Clip defaults to False:

Code: Select all

                   NewSeries = .AddSeries(scPoint)
                    With .Series(NewSeries)
                        .Title = GetFeatureName(NewSeries)
                        .ShowInLegend = False
                        .Marks.Style = smsLabel
                        .Marks.Visible = True
                        .Marks.Angle = 90
                        .Marks.Callout.distance = GetFeatureDistance(NewSeries)
                        .Marks.Frame.Visible = False
                        .Marks.BackColor = vbWhite
                    End With
                    With .Series(NewSeries).asPoint
                        .Pointer.Brush.Color = GetFeatureColor(NewSeries)
                        .Pointer.Style = GetFeatureStyle(NewSeries)
                        .Pointer.VerticalSize = GetFeatureSize(NewSeries)
                        .Pointer.HorizontalSize = GetFeatureSize(NewSeries)
                    End With
                    With .Tools
                      tmpIndex = .Add(tcDragPoint)
                      .Items(tmpIndex).asDragPoint.Series = NewSeries
                    End With