I've got Teechart 6.0.0.5. I plot my data using a line series with timestamps on the X-axis. When I encounter some null data in my source, I use AddNullXY with some explanatory text as the 3rd parameter, i.e.
Series(0).AddNullXY datestamp, value, "errorText"
Sometimes my data STARTS with a null. When I plot such data, the entire X-axis scale disappears! I see my label text near the origin of the X axis, but the X-axis scale is completely blank apart from that.
The line draws normally, I just have no timestamps along the X-axis.
Some investigation has shown that this corruption is caused by the label being passed to the AddNullXY method. I.e. if my initial AddNullXY call contains an empty string as the 3rd parameter, then the X-axis scale is drawn correctly.
Omitting the label is not an option. Can Steema help here?
Leading Null with PointLabel trashes x-axis
-
- Newbie
- Posts: 4
- Joined: Tue Jul 27, 2004 4:00 am
- Location: Western Australia
Hi,
to be able to show the labels you enter for the Null points and the DateTime values of the rest of the Points one way could be setting the Axis labels style to talText and also add the DateTime values as labels, i .e :
.Series(0).XValues.DateTime = True
.Series(0).AddNullXY Now, 0, "Error"
.Series(0).AddXY Now + 1, 10, DateValue(Now + 1), clTeeColor
.Axis.Bottom.Labels.Style = talText
to be able to show the labels you enter for the Null points and the DateTime values of the rest of the Points one way could be setting the Axis labels style to talText and also add the DateTime values as labels, i .e :
.Series(0).XValues.DateTime = True
.Series(0).AddNullXY Now, 0, "Error"
.Series(0).AddXY Now + 1, 10, DateValue(Now + 1), clTeeColor
.Axis.Bottom.Labels.Style = talText
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 4
- Joined: Tue Jul 27, 2004 4:00 am
- Location: Western Australia
Solved: My goal was not to display the point labels and dates simultaneously, but to ensure that dates were displayed consistently regardless of the presence or absence of point labels.
It looks like the style-guessing algorithm implied by talAuto was my problem. When I overrode this with
.Axis.Bottom.Labels.Style = 2 '2=talValue
then I got the dates all the time, which is what I was after. So thanks for the pointer in the right direction.
Regards,
Mike
It looks like the style-guessing algorithm implied by talAuto was my problem. When I overrode this with
.Axis.Bottom.Labels.Style = 2 '2=talValue
then I got the dates all the time, which is what I was after. So thanks for the pointer in the right direction.
Regards,
Mike