TeeSaveToHTML5 Java

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Menant.D
Newbie
Newbie
Posts: 2
Joined: Mon May 25, 2015 12:00 am

TeeSaveToHTML5 Java

Post by Menant.D » Tue Dec 22, 2015 2:22 pm

Hi,

Q1) how to save the chart to "HTML 5 JavaScript" by VCL pro since 2014 at run time.

I found in TeeHTML5Canvas unit with the function "TeeSaveToHTML5File" but not TeeHTML5Javascript unit .


Q2) do you have experience for integrated result save HTML5 in INTRAWEB ?

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeSaveToHTML5 Java

Post by Yeray » Tue Dec 22, 2015 2:51 pm

Hello,
Menant.D wrote:Q1) how to save the chart to "HTML 5 JavaScript" by VCL pro since 2014 at run time.

I found in TeeHTML5Canvas unit with the function "TeeSaveToHTML5File" but not TeeHTML5Javascript unit .
The following two alternatives seem to work fine for me here with v2015.16:

Code: Select all

uses TeeHTML5Canvas;
//...
TeeSaveToHTML5File(Chart1, 'C:\tmp\VCL2HTML5Canvas_test.html');

Code: Select all

uses TeeJavascript;
//...
TeeSaveToJavascriptFile(Chart1, 'C:\tmp\VCL2JS_test.html');
Menant.D wrote:Q2) do you have experience for integrated result save HTML5 in INTRAWEB ?
I'm afraid we haven't tested that.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Menant.D
Newbie
Newbie
Posts: 2
Joined: Mon May 25, 2015 12:00 am

Re: TeeSaveToHTML5 Java

Post by Menant.D » Wed Dec 23, 2015 8:21 am

Thank you,
Another question about the tools in the chart .
Can we force recording ( serialization ) in Javasript example:
Rectangle, near point ,color line , Band, etc. in VCL2014 ? or in VCL2015 new version?

or it can be encoded directly into the HTML file ?
if yes, do you have exemple of potential add a tools directly in a javascript?

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TeeSaveToHTML5 Java

Post by Yeray » Thu Dec 24, 2015 10:07 am

Hello,
Menant.D wrote:Another question about the tools in the chart .
Can we force recording ( serialization ) in Javasript example:
Rectangle, near point ,color line , Band, etc. in VCL2014 ? or in VCL2015 new version?

or it can be encoded directly into the HTML file ?
if yes, do you have exemple of potential add a tools directly in a javascript?
TeeSaveToHTML5File creates an html page that contains the VCL chart directly drawn using javascript functions. This is a static chart, similar to an exportation to an image.
TeeSaveToJavascriptFile creates an html page that contains TeeChart HTML5/Javascript objects (TChart, Series, Tools,...). This means the chart is "alive", supporting zoom, scroll, etc.
Also some tools are translated from TeeChart VCL to TeeChart HTML5, but I'm afraid not all, and some of them still with some limitations.
I've tested the TRectangleTool, the TColorLineTool and the TColorBandTool with the actual version (v2015.16) but only the TRectangleTool seems to be translated into a Tee.Annotation tool in TeeChart HTML5, and without respecting the position (I've corrected it for the next maintenance release). The other tools aren't translated because they don't exist in TeeChart HTML5 (see the reference demo here).
I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1400

Here it is the code I've used to test it:

Code: Select all

uses Series, TeeTools, TeeJavascript;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=false;
  Chart1.Legend.Visible:=false;
  Chart1.AddSeries(TPointSeries).FillSampleValues(10);

  with Chart1.Tools.Add(TRectangleTool) as TRectangleTool do
  begin
    AutoSize:=true;
    Text:='My Rectangle Tool';
    Shape.Transparency:=20;

    Chart1.Draw;

    Left:=Chart1[0].CalcXPos(6) + 5;
    Top:=Chart1[0].CalcYPos(6) - Shape.Height - 10;
  end;

  with Chart1.Tools.Add(TColorLineTool) as TColorLineTool do
  begin
    Axis:=Chart1.Axes.Bottom;
    Value:=6;
    Pen.Color:=clRed;
  end;

  with Chart1.Tools.Add(TColorBandTool) as TColorBandTool do
  begin
    Axis:=Chart1.Axes.Bottom;
    StartValue:=1;
    EndValue:=4;
    Transparency:=50;
    Color:=clRed;
  end;

  TeeSaveToJavascriptFile(Chart1, 'C:\tmp\VCL2JS_test.html');
end;
Regarding the "near point", could you please detail what exact tool do you have in TeeChart VCL that you want in TeeChart HTML5?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply