Hallo,
I have a Financial Graph with DateTime on the bottom axis.
When I run my program, TempSeries might be created. If TempSeries are created, and only then, after the creation of one ore more TempSeries the DateTime of the BottomAxis changes to a value (indicating 271 and all the labels of the TempSeries show 271 irrespective of the datetime of the bottom axis)
How can I solve this to get the normal BottomAxis with DateTime values back?
Many thanks
Frits
BottomAxis
Hi.
When series is created then (by default) it's XValues.DateTime property is set to false meaning internal algorithm will treat x values as double and not as TDateTime. To change this, set the newly created series XValues.DateTime property to True:
When series is created then (by default) it's XValues.DateTime property is set to false meaning internal algorithm will treat x values as double and not as TDateTime. To change this, set the newly created series XValues.DateTime property to True:
Code: Select all
TempSeries.XValues.DateTime := True;
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Thanks for the answer Marjan!
The " Tempserie.XValues.DateTime := true;" does not work.
Somehow the Tempserie.Marks.XValue text is plotted on the BottomAxis of the ParentChart and it overwrites the DateTime on the bottomAxis.
I worked around the problem and Assigned the Tempseries.HorizAxis := ParentChart.TopAxis and made the ParentChart.TopAxix.Visible := false;
It is not a nice solution but this works fine for me for now.
If you have any suggestion what I have initially done wrong I would like to hear it.
Thanks again & Best regards
Frits
The " Tempserie.XValues.DateTime := true;" does not work.
Somehow the Tempserie.Marks.XValue text is plotted on the BottomAxis of the ParentChart and it overwrites the DateTime on the bottomAxis.
I worked around the problem and Assigned the Tempseries.HorizAxis := ParentChart.TopAxis and made the ParentChart.TopAxix.Visible := false;
It is not a nice solution but this works fine for me for now.
If you have any suggestion what I have initially done wrong I would like to hear it.
Thanks again & Best regards
Frits
Hi.
Perhaps you should also try to force the bottom axis labels to datetime by using the following code:
Perhaps you should also try to force the bottom axis labels to datetime by using the following code:
Code: Select all
// use series x values for axis labels
tChart1.Axes.Bottom.LabelStyle := talValue;
// or TempSeries.GetHorizAxis.LabelStyle := talValue;
Marjan Slatinek,
http://www.steema.com
http://www.steema.com