Not enough graticules

TeeChart for ActiveX, COM and ASP
Post Reply
Neil
Newbie
Newbie
Posts: 10
Joined: Wed Oct 09, 2002 4:00 am
Location: UK
Contact:

Not enough graticules

Post by Neil » Fri Oct 08, 2004 11:49 am

My graph shows x-axis points between 0 and 1.5 mm. There may be 100 points on the graph between these limits.

The x axis label (below the graph) shows only 0 (at the left) and 1 (in the middle).

If I zoom in, I get lots of items on the axis, but I zoom out and only get 0 and 1.

Is there any way to cure this?

The Y axis shows 0 to 10 which is ok.

Neil

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Oct 08, 2004 4:08 pm

Hi Neil,

how about setting an increment ? :
TChart1.Axis.Bottom.Increment = 0.01

Neil
Newbie
Newbie
Posts: 10
Joined: Wed Oct 09, 2002 4:00 am
Location: UK
Contact:

Post by Neil » Mon Oct 11, 2004 3:22 pm

Yup, that works fine.

I've done

Code: Select all

CAxis bottomAxis = m_pChart->GetAxis().GetBottom();
double range = bottomAxis.GetMaximum() - bottomAxis.GetMinimum();
bottomAxis.SetIncrement(range/10);
I would have thought something like this is already built in?

Neil

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Oct 13, 2004 7:40 am

Hi Neil,

I think this is the best way.

Post Reply