Jump to content
Software FX Community

Strange problems related to X axis labels and tick marks


User (Legacy)
 Share

Recommended Posts

Francisco, 

Once again, I am using VB 6.0 with version 4.0.16.0 Chart FX.

Another issue I am trying to resolve:

I am running an unlimited real time strip chart (2d) with 2 series which

has a transparent

background, a JPEG picture for a backdrop and is scrollable. The chart

runs fine and all the labels

appear correctly while the chart is running and displaying real time

data. Now, when I stop

the chart I switch from scrollable to non-scrollable so the user can see

the entire data plot. At

this point I am also re-formatting the X axis and filling in time

labels. I am manually spinning

through a loop and assigning strings to each one of the X axis lables

because I could not

get the ChartFx AF_TIME format to step properly using the LabelValue()

property, or

by setting the Min and Max time and specifying a STEP. Also, in certain

cases I need to

display tenth of a second time resolution so I have to format strings

manually, not a problem.

Below is the VB code I'm using to assign labels:

' Set the first label to the time the chart was started (sTime =

"6:00:03 PM" as an example)

LabelVal = sTime

' Loop through and assign time labels to the major tick marks on the

X axis (there are 10 tick marks)

For j = 0 To CInt(X_AXIS_LABEL_COUNT) - 1

chart.Legend(j) = LabelVal

temp = CStr(DateAdd("s", secondsBetweenIntervals, LabelVal))

LabelVal = temp

Next j

However, the strange thing is that certain labels appear blank on the X

axis. The label

which dissapears changes at random...sometimes it's the second,

sometimes the fourth,

sometimes the sixth...you get the point. I've checked the string I'm

assigning to the Label

and it is definitely valid. Also, I am calling this same routine to

fill in X axis lables for a different,

non real time chart and it works perfectly. Also, I would like for the

major tick marks

to be lined up with the Zero line on the X axis. As you can see from

the screenshot I included,

the first tick mark has a slight offset from the zero line.

As always, any suggestions greatly appreciated,

Gary

gkercheck@yahoo.com

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.

Guest
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.

 Share

×
×
  • Create New...