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?