Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2476 - Export to Javascript changes axis datetime format
Summary: Export to Javascript changes axis datetime format
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Export (show other bugs)
Version: 33.210915
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: yeray alonso
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-27 08:35 EDT by yeray alonso
Modified: 2021-10-27 08:37 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2021-10-27 08:35:49 EDT
The following chart in VCL, whithout setting any datetime format shows the bottom axis labels like "17:20" while in Javascript shows "Wed Oct 27 2021 17:20:00"

procedure TForm1.LocalDatetimeToJavascript;
const fileName='test';
var i: Integer;
    tmp: TDateTime;
begin
  with Chart1.AddSeries(TBarSeries) do
  begin
    XValues.DateTime:=True;
    FillSampleValues;
    Marks.Hide;
    tmp:=Now;

    for i:=0 to Count-1 do
    begin
      tmp:=IncHour(tmp,1);
      XValue[i]:=tmp
    end;
  end;

  TeeSaveToJavascriptFile(Chart1, fileName+'.html');
  TeeGoToURL(Handle,fileName+'.html');
end;

Also, having "hh" format in delphi should be "HH" in javascript, "am/pm" should be "tt", "AM/PM" should be "TT", "a/p" should be "t" and "A/P" should be "T".