Page 1 of 1

Keep Marks on the graph???

Posted: Mon Mar 27, 2006 2:38 pm
by 9079179
Hello,

I have my Marks set to be visble on my chart. Sometimes if the point that my Mark shows is near the edge of the chart...the Mark is cut off. In other words..... The Mark goes off the edge of the chart. How can I keep the Marks on the chart?

Here is a sample picture:

http://www.lifebreed.com/chart.jpg

Thanks![/url]

Posted: Mon Mar 27, 2006 2:42 pm
by narcis
Hi Jeff,

Try using:

Code: Select all

    TChart1.Series(0).Marks.Clip = False

Posted: Mon Mar 27, 2006 6:45 pm
by 9079179
Thanks...BUT.....I suppose I should have been a bit clearer. It appears that your code only keeps the Mark from being clipped on the graph itself. (I know I said graph)...but what I mean is that the Mark runs off of the actually chart control itself. How do I keep it from running off the chart control? I suspect I can't.

Thanks!

Posted: Mon Mar 27, 2006 7:34 pm
by 9079179
Duh! I just change the width of the right margin. What a day!

Posted: Tue Mar 28, 2006 8:16 am
by narcis
Hi Jeff,

You could also clip the full chart area by doing something like this:

Code: Select all

Private Sub TChart1_OnAfterDraw()
    Me.ScaleMode = vbPixels
    TChart1.Canvas.ClipRectangle 0, 0, TChart1.Width, TChart1.Height
End Sub