Jump to content
Software FX Community

Re: Many Dates on X-Axis

User (Legacy)

Recommended Posts

Thanks for your reply Frank.. 

The problem I have now is that as soon as I set the STEP to 1, my labels

disappear because it seems to write " "'s into the non-used labels. I am

sure I am doing something fundamentally wrong and I have included my code

hoping you will look at it and immediately work out what a dunce I am...


Jon Sherren

public npoints

close datab

use p_1

sele open, high, low, close, vol, date from p_1 into array ppp

npoints = _tally

sdate = year(ppp(1,6))

with thisform.chartfx1

** read previously saved template



.OpenDataEx (COD_VALUES,4,npoints)

for j = 0 to npoints-1

* only label when the year changes

if sdate <> year(ppp(j+1,6))

.axis(AXIS_X).label(j) = ppp(j+1,6)

sdate = year(ppp(j+1,6))


.valueEx(OHLC_open,j) = ppp(j+1,1)

.valueEx(OHLC_high,j) = ppp(j+1,2)

.valueEx(OHLC_low,j) = ppp(j+1,3)

.valueEx(OHLC_close,j) = ppp(j+1,4)

next j

.closeData (COD_VALUES)

*.axis(AXIS_X).tickmark = TS_NONE &&&& try turning off the tickmarks

.adm(CSA_XGAP) = 1

.Axis(AXIS_X).Grid = .f.

.Axis(AXIS_X).Format = "Dyyyy"

.Axis(AXIS_Y).min = 300


Francisco Padron wrote in message ...

>So, you want an "uneven" step (the physical distance between two


>labels can vary) ?, If so, the only way you can achieve this is by manually

>setting the X-Axis labels ONLY for those points that you want to label. In

>your case that will be one label per year. For instance, you may want to

>label the first point of each year.


>You can use the Label property to set these labels.


>Note: You need to set the X-Axis Step to 1.





Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...