In my case, I have three different vertical custom axes on a particular chart. Each custom axis has its max and min set programmatically (instead of automatic). The problem is that some of the series data is greater than a particular custom axis. Hence, the line drawn goes right past a custom axis and into another.
I used some code from the TeeChart samples project under All Features -> Axis -> Opaque zones to try and clip the larger series values. This did not work.
Here is a relevant code snippet:
Code: Select all
private void series1_BeforeDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
Steema.TeeChart.Styles.Series series = sender as Steema.TeeChart.Styles.Series;
if (series != null)
{
int left = series.GetHorizAxis.IStartPos;
int right = series.GetHorizAxis.IEndPos;
int top = series.GetVertAxis.IStartPos;
int bottom = series.GetVertAxis.IEndPos;
g.ClipRectangle(left, top, right, bottom);
}
}
private void series1_AfterDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
g.UnClip();
}