how to fit tic marks on the horizontal axis in foxcharts

Topics: General
Oct 7, 2009 at 3:07 PM
Edited Oct 7, 2009 at 3:08 PM

I have many charts where there are too many points  to show a legend for each point -- so I would like fit a tic mark every 2nd or more data point. Please help me!

thank you

 

Oct 7, 2009 at 5:03 PM

Hi,

 

Please try to use the property ShowAxis2Tic  whiich would make it possible to show the tics conditionaly.

 

Regards,

 

Koen

 

Oct 9, 2009 at 9:20 AM

Hi,

you could make e.g. a function

lshowAxis2Tic = mod(recno,2)

which will show only the even ticks.

lshowAxis2Tic = mod(recno,3) 

will show every third tick

Regards,

Koen

 

 

Coordinator
Oct 9, 2009 at 1:34 PM

Cesar --

The improvement I would like to see on this issue of the tick marks on the horizontal axis is as follows:

Create two new properties, which apply only when the legend from XAxisLegend2 are blank:

  1. ShowAxis2TicsBlank -- If .T., show the tick mark (default = .T.)
  2. TicLengthBlank -- Length of the tick mark; if 0, use Property TicLength (Default = 0)

This would allow for turning off tick marks altogether when the legend is blank (which I assume is the case in the note that started this thread), or at least allow them to be shorter than those where the legend is not blank.

On a related noted -- I also think that when the tick length gets sufficiently large, the X-Axis legends should get pushed down to make room for their display.  Try a value of 8, for instance -- the tick marks then descend into the X-Axis legends

Cheers

Jim

Oct 16, 2009 at 11:41 AM

Hello! Koen.

Is "lshowAxis2Tic" user-defined variable ?If not,where should I fit it? I can't get that I want.

Best wishs

Chjun

Oct 16, 2009 at 11:47 AM
jimrnelson wrote:

Cesar --

The improvement I would like to see on this issue of the tick marks on the horizontal axis is as follows:

Create two new properties, which apply only when the legend from XAxisLegend2 are blank:

  1. ShowAxis2TicsBlank -- If .T., show the tick mark (default = .T.)
  2. TicLengthBlank -- Length of the tick mark; if 0, use Property TicLength (Default = 0)

This would allow for turning off tick marks altogether when the legend is blank (which I assume is the case in the note that started this thread), or at least allow them to be shorter than those where the legend is not blank.

On a related noted -- I also think that when the tick length gets sufficiently large, the X-Axis legends should get pushed down to make room for their display.  Try a value of 8, for instance -- the tick marks then descend into the X-Axis legends

Cheers

Jim

 

Good idea!

 

Oct 22, 2009 at 8:57 AM

How to show the ticmarks conditionally in FoxCharts.vcx?

First you subclass the original FoxCharts.vcx to your own class.

Now you add a new method ShowTics and a property nTicInterval to your FoxCharts class

You copy the method  _drawXaxisLegend from the original class.

In your   _drawXaxisLegend method you insert   just below  * Draw the tic mark

this.ShowTics(recno())

                                                     

the newly created method  ShowTics has following coding:

parameters lnTicnumber

local lRet

 

do case

      case this.nTicInterval = 0

            this.ShowAxis2Tics = .t.

      case lnTicnumber = 1   &&always show the 1st Tic

            this.ShowAxis2Tics = .t.

      ** for TicInterval = 2 show the odd tics

      case  mod(iif(this.nTicInterval= 2,lnTicNumber+1,lnTicNumber),this.nTicInterval) <> 0

            this.ShowAxis2Tics = .f.

      otherwise

            this.ShowAxis2Tics = .t.

endcase

Now you only have to set the property  nTicInterval to your requested value.

Regards,

 

Koen