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 2478 - XValues change when exporting to Javascript
Summary: XValues change when exporting to Javascript
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: https://www.steema.com/support/viewto...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-28 07:33 EDT by yeray alonso
Modified: 2021-10-28 10:01 EDT (History)
1 user (show)

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


Attachments
screenshot (80.82 KB, image/png)
2021-10-28 07:35 EDT, yeray alonso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2021-10-28 07:33:26 EDT
Exporting a chart with datetimes to javascript, the values are modified.
This example creates xvalues starting at 0:00 but the xvalues in the javascript side start at 02: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:=Today;

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

  TeeSaveToJavascriptFile(Chart1, fileName+'.html');
  TeeGoToURL(Handle,fileName+'.html');
end;
Comment 1 yeray alonso 2021-10-28 07:35:11 EDT
Created attachment 989 [details]
screenshot