Hi,
If I add DateTime Values to the bottom axis an open a Charteditor at runtime, the x values are shown correctly but the y values show the DatTime FormatString ('hh:mm') instead of the correct data. y data points are simple integer values.
See attachment.
Any suggestion about that behavior?
TeeChart 8 pro / RAD 2009
Regards, Messie
Wrong Data shown in TChartEditor using DateTime Values
Wrong Data shown in TChartEditor using DateTime Values
- Attachments
-
- ChartEditor.GIF (56.72 KiB) Viewed 7951 times
Re: Wrong Data shown in TChartEditor using DateTime Values
Hi Messie,
Could you please attach a simple example project we can run as-is to reproduce the problem here?
The following code seems to work as expected here:
Could you please attach a simple example project we can run as-is to reproduce the problem here?
The following code seems to work as expected here:
Code: Select all
uses Series, GanttCh;
procedure TForm1.FormCreate(Sender: TObject);
var Series1: TGanttSeries;
i: Integer;
begin
Series1 := TGanttSeries.Create(self);
Chart1.AddSeries(Series1);
for i := 0 to 9 do
Series1.AddGantt(Now()+i, Now()+i+10, random*100);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Wrong Data shown in TChartEditor using DateTime Values
Ok, here we are.
Regards, Messie
Regards, Messie
- Attachments
-
- DateTime Problem Demo.zip
- (6.01 KiB) Downloaded 541 times
Re: Wrong Data shown in TChartEditor using DateTime Values
Hi Messie,
I see in your project that you've changed you series' ValueFormat from #,##0.### to hh:mm at design time. Note that this is for the YValues, so here it is the explanation of your result.
If you still find problems with anything, don't hesitate to let us know.
I see in your project that you've changed you series' ValueFormat from #,##0.### to hh:mm at design time. Note that this is for the YValues, so here it is the explanation of your result.
If you still find problems with anything, don't hesitate to let us know.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Wrong Data shown in TChartEditor using DateTime Values
Yes, you're right. I thought that this was the correct position to set. So where can I set the format string for the DateTime X Axis?
Thanks, Ulfert
Thanks, Ulfert
Re: Wrong Data shown in TChartEditor using DateTime Values
Hi Messie,
To show hours:minutes in the bottom axis you should do as follows:
Note that this is explained at the Tutorial 4 - Axis Control. You'll find tutorials and demos at TeeChart programs group.
To show hours:minutes in the bottom axis you should do as follows:
Code: Select all
Series1.XValues.DateTime := true;
Chart1.Axes.Bottom.DateTimeFormat := 'hh:mm';
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |