Page 1 of 1

Minor grid will disappear when I move the chart

Posted: Tue Jun 09, 2009 2:48 am
by 9788264
Below code is to show the grid and minor grid on the teechart, ifI move the chart, when the grid is near the left axis, the minor grid will disappear, I want to know how to fix this issue. I want to show all the grid all the time.

Steema.TeeChart.Styles.Line line = new Styles.Line(Tchart01.Chart);
double x = 0;

while (x < 0.3)
{
line.Add(x, Math.Cos(x));
x += 0.001;
}

Tchart01.Aspect.View3D = false;
Tchart01.Axes.Bottom.Increment = 0.2;
Tchart01.Axes.Bottom.MinorTickCount = 4;
Tchart01.Axes.Bottom.Grid.Visible = true;
Tchart01.Axes.Bottom.MinorGrid.Visible = true;
Tchart01.Axes.Bottom.Grid.Width = 3;
Tchart01.Axes.Bottom.MinorGrid.Width = 1;
}

Posted: Tue Jun 09, 2009 9:59 am
by yeray
Hi Mike,

This happens when only one label is displayed in the bottom axis. The chart needs two labels to divide the space between MinorTickCount to determine minor tick positions.
So when there is only one label displayed, the chart can't do this calculation.
I've added this to the wish list to be enhanced for future releases (TF02014224). In the meanwhile, if possible, you could adjust your increment to ensure that always there are two labels drawn in the axis.