Page 1 of 1

New HTML5 Canvas and Export class?

Posted: Fri Feb 04, 2011 5:07 pm
by 15049687
In your release notes I see ...
> ===============================================
> Release Notes 4th October 2010
> TeeChart VCL version 2010
> Build 2010.01.11004
> ===============================================
> New Features
> --------------------------
> 27) New HTML5 Canvas and Export class.
> --------------------------

However, I can't find any mention of HTML5 in the help.
Do you have any documentation on how to use this new feature?

Thanks!

Re: New HTML5 Canvas and Export class?

Posted: Thu Feb 10, 2011 8:36 pm
by yeray
Hi tmecham,

Excuse us for the delayed reply.
Here it is an example of this feature usage:

Code: Select all

uses Chart, Series, TeeHTML5Canvas, TeCanvas;

procedure TForm1.FormCreate(Sender: TObject);
var Chart1: TChart;
    MyStringList: TStringList;
begin
  Chart1:=TChart.Create(self);
  Chart1.Parent:=Form1;
  Chart1.AddSeries(TBarSeries).FillSampleValues;

  MyStringList:=TStringList.Create;
  Chart1.Canvas:=THTML5Canvas.CreateText(MyStringList);
  Chart1.Draw;
  MyStringList.SaveToFile('c:\tmp\test.html');

  Chart1.Canvas:=TTeeCanvas3D.Create;
end;

Re: New HTML5 Canvas and Export class?

Posted: Thu Feb 10, 2011 10:16 pm
by 15049687
We are trying to test your example code and don't seem to have the TeeHTML5Canvas unit. We are using the v2010 demo for Delphi 2007. Any advise on how we could test this further would be greatly appreciated.

Re: New HTML5 Canvas and Export class?

Posted: Fri Feb 11, 2011 2:05 pm
by yeray
Hi tmecham,

I can see the unit TeeHTML5Canvas (.dfm, .pas and .xfm) in my TeeChart VCL 2010.01 with Sources installation (and also in the recent 2010.02). Could you please check it?
Default path: "C:\Program Files\Steema Software\TeeChart Pro 2010 Full Source Code\Sources"

Re: New HTML5 Canvas and Export class?

Posted: Fri Feb 11, 2011 6:15 pm
by 15049687
We are using the demo version, so we don't have any sources, but there is no file on my machine that has the name TeeHTML5Canvas. Here is my steema directory structure after installing the demo.
steema.png
Directory structure
steema.png (75.53 KiB) Viewed 18548 times

Re: New HTML5 Canvas and Export class?

Posted: Mon Feb 14, 2011 4:11 pm
by yeray
Hi tmecham,

Excuse me. I'm not sure why I thought you were a source code customer.
We are investigating why the unit isn't in the Lib folder of the installations.
In the meanwhile, you can use the dcu+dfm attached. Please extract the contents into Lib folder in your TeeChart installation.
TeeHTML5Canvas (dfm+dcu).zip
(18.8 KiB) Downloaded 874 times

Re: New HTML5 Canvas and Export class?

Posted: Mon Feb 14, 2011 4:16 pm
by 15049687
Thank you! We will check this out. Just for the record, we are a source code customer, we just haven't upgraded to 2010 yet. We were wanting to test the HTML5 canvas stuff before we upgraded.

Thanks again!

Re: New HTML5 Canvas and Export class?

Posted: Mon Feb 14, 2011 4:25 pm
by yeray
Hi tmecham,

You're welcome.
Any feedback will be appreciated.

Re: New HTML5 Canvas and Export class?

Posted: Mon Feb 14, 2011 6:21 pm
by 15049687
We tried your example with those dcu+dfm files and got the following error:

[DCC Error] Unit1.pas(24): F2051 Unit TeeHTML5Canvas was compiled with a different version of TeCanvas.TTeeGradient

Perhaps it is because we are using the v2010 demo for Delphi 2007?

Should we just wait until the install gets repaired?

Thanks!

Re: New HTML5 Canvas and Export class?

Posted: Tue Feb 15, 2011 9:18 am
by yeray
Hi tmecham,

I've sent the pas, the dfm and the xfm directly to the mail account you have registered in this forums. Could you please try with them?

Re: New HTML5 Canvas and Export class?

Posted: Wed Feb 16, 2011 12:37 pm
by 15049687
Thanks for your help getting the HTML5 canvas stuff going. We have been able to get your example working and have it rendering in the browser.

So now after evaluating what you are doing, we are wondering what your future plans are. Being able to render a static image in JavaScript doesn't seem like it buys us much over just exporting to an image file.

We are looking for something more interactive that we can generate and then populate the data of each series dynamically using AJAX. Also, we need the ability to interact with zooming and scrolling etc.

So, basically we want to know if you are planning on expanding what you have now into something that would be more "Live" in the HTML5 canvas or if we need to keep looking around. We use your VCL and ActiveX as a standard in all of our software products, so we would love to be able to use your charts on the web.

Re: New HTML5 Canvas and Export class?

Posted: Thu Mar 10, 2011 2:08 pm
by yeray
Hi tmecham,

Excuse us for the delayed reply.
I've added your request to the wish list to be enhanced in future releases (TV52015442). I'm afraid I'm not sure if this will be easy to implement or not so I can't tell when we will be able to support more interaction in the HTML5 exported charts.

Re: New HTML5 Canvas and Export class?

Posted: Thu Mar 10, 2011 4:09 pm
by 15049687
Thanks for the update. We look forward to seeing dynamic charts in HTML5.