Hi,
We use tchart to create graphs, save them to jpegs or pings, and stream them down to a web browser. It works well. However, we would like to use the new tTeegdiplus component to anti-alias and streamline the charts.
We have tried creating a teegdiplus at runtime and assigning its teechart property, e.g.,
gdiCanvas := tTeeGDIPlus.create(nil);
gdiCanvas.TeePanel := mynewchart;
However when we set the gdicanvas.active property to true we get a "no parent window control message".
We also tried creating a form at runtime, then assigning the teechart and the TeeGDIPlus component to it (e.g., gdiCanvas := tTeeGDIPlus.create(mynewform)) but still get the same error message.
Any help would be appreciated.
Thanks.
gdi+ with webbroker?
Re: gdi+ with webbroker?
Hi Charlie,
I haven't tried it with WebBroker, but creating a simple chart with GDIPlus and exporting it to jpg/png seems to work fine for me here.
I haven't tried it with WebBroker, but creating a simple chart with GDIPlus and exporting it to jpg/png seems to work fine for me here.
Code: Select all
uses Chart, TeeGDIPlus, Series, TeeJPEG, TeePNG;
procedure TForm1.FormCreate(Sender: TObject);
var mynewchart: TChart;
gdiCanvas: tTeeGDIPlus;
begin
mynewchart:=TChart.Create(nil);
mynewchart.Parent:=Self;
gdiCanvas := tTeeGDIPlus.create(nil);
gdiCanvas.TeePanel:=mynewchart;
gdiCanvas.Active:=true;
mynewchart.AddSeries(TBarSeries).FillSampleValues;
TeeSaveToJPEG(mynewchart, 'C:\tmp\mynewchart.jpg', mynewchart.Width, mynewchart.Height);
TeeSaveToPNG(mynewchart, 'C:\tmp\mynewchart.png');
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |