Jump to content
Software FX Community

Strange problems related to X axis labels and tick marks


User (Legacy)

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...