Recent

Author Topic: Number of axis marks for TAChart  (Read 5328 times)

dkjMusic

  • Full Member
  • ***
  • Posts: 146
Number of axis marks for TAChart
« on: May 01, 2011, 01:23:47 am »
For the axis demo/logarithmic-transform page, is there a way to obtain more than 5 marks/horizontal-grid-lines for the left axis?
Windows 7 Ultimate/32 bit;
Lazarus 0.9.31/Rev 33300;
FPC 2.7.1/Rev 19464;
GDB 7.0.50;
(via CodeTyphon 2.30)

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: Number of axis marks for TAChart
« Reply #1 on: May 02, 2011, 11:26:51 am »
Right now the only thing you can do is to supply your own Source for marks.
I do plan to add more options to the default marks source -- you can create
a feature request on Mantis to prod me ;-)

In particular, I what to know how would you like to set the number of marks --
by stating fixed number, minimum/maximum distance between marks,
some other means?

dkjMusic

  • Full Member
  • ***
  • Posts: 146
Re: Number of axis marks for TAChart
« Reply #2 on: May 02, 2011, 02:01:32 pm »
Right now the only thing you can do is to supply your own Source for marks.
I do plan to add more options to the default marks source -- you can create
a feature request on Mantis to prod me ;-)

In particular, I what to know how would you like to set the number of marks --
by stating fixed number, minimum/maximum distance between marks,
some other means?

For this example, could you detail the Source strings for marks at 1,10,100, and 1000?

In general, I find the marks for linear plots to work just fine for me. However, for log plots I would like to have marks at each power of 10 starting just below the minY and continuing to just above maxY. For example, if minY=4.1 and maxY=41000, I would like marks at 1,10,100,1000,10000, and 100000.

Many thanks for your help.
Windows 7 Ultimate/32 bit;
Lazarus 0.9.31/Rev 33300;
FPC 2.7.1/Rev 19464;
GDB 7.0.50;
(via CodeTyphon 2.30)

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: Number of axis marks for TAChart
« Reply #3 on: May 02, 2011, 05:07:06 pm »
Just add ListChartSource and enter
Code: [Select]
1|0.1
2|1
3|10
4|100
5|1000
6|10000
into DataPoints property, then assign it to LeftAxis.Marks.Source

 

TinyPortal © 2005-2018