Page 1 of 1

Placing items at exact position on Bottom axis

Posted: Mon Nov 03, 2008 3:59 pm
by 9235955
I have a simple one series chart with the bottom axis ranging from 0 to 8760 (the number of hours in the year).

I am trying to add my on items, to control the labeling. I have tried the following:

chart2.Axes.Bottom.Items.Add(2000);
chart2.Axes.Bottom.Items.Add(6000);

or

chart2.Axes.Bottom.Items.Add(2000, '2K') ;
chart2.Axes.Bottom.Items.Add(6000, '6K') ;

Regardless of which way I do it, I get one mark at 4,000. I am working with a small graph, so I have to control the location and I know space is an issue. If I do not try to add the items as above, I get one item at 4,000.

I have also tried one item only say:

chart2.Axes.Bottom.Items.Add(3500);

I still get the mark at 4,000.

Anything I am doing wrong?

Posted: Mon Nov 03, 2008 4:06 pm
by narcis
Hi jz8,

Have you tried clearing exisiting labels before?

Code: Select all

  Chart1.Axes.Bottom.Items.Clear;

Posted: Mon Nov 03, 2008 7:23 pm
by 9235955
well I have now -- that doesn't seem to be the issue -- still not working.

Posted: Tue Nov 04, 2008 10:13 am
by narcis
Hi jz8,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

Posted: Tue Nov 04, 2008 12:36 pm
by 9235955
Trying to clean out the application to send it to you, I determined that there was another place to add this code. I now have it directly after the first time I enter data for the series of the graph -- that is with the .clear statement you suggested I add.

It is now working.

Thanks