3D Cylinder
3D Cylinder
Hello,
is it possible to create a chart that looks similar to that one I attached as an image? I mean the cylinder only. The tube surrounding the cylinder could be a backimage. I tried the cylinder series type but that doesn't look so smooth as in the image. And we don't want to use neither Open GL nor GDI+.
Thanks for your support!
Regards Markus
is it possible to create a chart that looks similar to that one I attached as an image? I mean the cylinder only. The tube surrounding the cylinder could be a backimage. I tried the cylinder series type but that doesn't look so smooth as in the image. And we don't want to use neither Open GL nor GDI+.
Thanks for your support!
Regards Markus
Re: 3D Cylinder
Hello Markus,
I'm afraid the smoothed curves is one of the GDI limitations.
Here you have the results I get with GDI, GDI+ and GDI&AntiAliasTool.
I'm afraid the smoothed curves is one of the GDI limitations.
Here you have the results I get with GDI, GDI+ and GDI&AntiAliasTool.
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Chart3DPercent:=100;
with Chart1.AddSeries(TBarSeries) as TBarSeries do
begin
FillSampleValues();
BarStyle:=bsCilinder;
MultiBar:=mbSelfStack;
Marks.Visible:=false;
ColorEachPoint:=true;
Dark3D:=false;
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: 3D Cylinder
Thanks for your Reply!
But how was this chart
created? This is an example from the steema gallery. Theses are also cylinders but they look very much better than the regular cylinder bar chart. Using the regular cylinder bar chart one have very few options to change the look of the cylinders. E.g. using a gradient fill.
Thanks again for your help!
Greetings Markus
But how was this chart
created? This is an example from the steema gallery. Theses are also cylinders but they look very much better than the regular cylinder bar chart. Using the regular cylinder bar chart one have very few options to change the look of the cylinders. E.g. using a gradient fill.
Thanks again for your help!
Greetings Markus
Re: 3D Cylinder
Hello
This example from the gallery was made with TeeChart .NET and some of Micrsoft .NET Framework drawing techniques are not available in the VCL framework.
However, with GDI+ and the following code I get a quite similar result:
This example from the gallery was made with TeeChart .NET and some of Micrsoft .NET Framework drawing techniques are not available in the VCL framework.
However, with GDI+ and the following code I get a quite similar result:
Code: Select all
uses TeeSurfa, TeeGDIPlus, TeeTools;
procedure TForm1.FormCreate(Sender: TObject);
begin
with TTeeGDIPlus.Create(self) do
begin
TeePanel:=Chart1;
Active:=true;
end;
Chart1.Title.Visible:=false;
Chart1.Chart3DPercent:=100;
Chart1.Legend.Visible:=false;
Chart1.Aspect.Orthogonal:=false;
Chart1.Aspect.Zoom:=70;
Chart1.Aspect.Rotation:=325;
Chart1.Aspect.Elevation:=340;
Chart1.Walls.Left.Size:=10;
Chart1.Walls.Bottom.Size:=10;
with Chart1.Tools.Add(TGridBandTool) as TGridBandTool do
begin
Axis:=Chart1.Axes.Left;
Band1.Color:=clGrayText;
Band1.Transparency:=50;
Band2.Transparency:=50;
end;
with Chart1.AddSeries(TTowerSeries) as TTowerSeries do
begin
FillSampleValues();
Origin:=YValues.MinValue+(YValues.MaxValue-YValues.MinValue)/2;
UseOrigin:=true;
TowerStyle:=tsCylinder;
Marks.Visible:=false;
Dark3D:=false;
Transparency:=30;
UseColorRange:=false;
UsePalette:=true;
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: 3D Cylinder
Hi Yeray,
thank you very much for your in depth answer! No I see things clearer .
I decided to go another way and for that I need one more information. How can I get the exact position of a single series value point? I mean the X and Y coordinates and the Height and Width of a column that was drawn by the chart.
Thanks again for your help!
thank you very much for your in depth answer! No I see things clearer .
I decided to go another way and for that I need one more information. How can I get the exact position of a single series value point? I mean the X and Y coordinates and the Height and Width of a column that was drawn by the chart.
Thanks again for your help!
Re: 3D Cylinder
Hello,
Check the series' CalcXPos and CalcYPos functions.
Check the series' CalcXPos and CalcYPos functions.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: 3D Cylinder
That's ok. And the Height and Width of a value point? Or the Right and Bottom Coordinates? Are theses values also available? I want to know the BoundsRect of a value point (e.g. Bar)
Greetings Markus
Greetings Markus
Re: 3D Cylinder
Hi Yeray,
I moved a bit further. I found out how to get the BoundRect of a TBarSeries. So I am able to cover a bar with images so that I receive the result I want. But now I have another problem. I want to export my chart to a png file. The chart contains some png images with alpha channel. Exporting the chart to png in Delphi 2010 all works fine as you can see in that image
But If I do the same with the same code in Delphi 2007 the result looks like this:
I am using the following code to do the export
Any idea? What's differnt in D 2007?
I moved a bit further. I found out how to get the BoundRect of a TBarSeries. So I am able to cover a bar with images so that I receive the result I want. But now I have another problem. I want to export my chart to a png file. The chart contains some png images with alpha channel. Exporting the chart to png in Delphi 2010 all works fine as you can see in that image
But If I do the same with the same code in Delphi 2007 the result looks like this:
I am using the following code to do the export
Code: Select all
tmp := TPNGExportFormat.Create;
tmp.Panel := Chart1;
tmp.SaveToFile(ChartImageFile);
tmp.Free;
Any idea? What's differnt in D 2007?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: 3D Cylinder
Hi Markus,
Are you using exactly the same version in both Delphi? If that's the case I would expect the behavior to be identical. If the problem persists can you please attach a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
Are you using exactly the same version in both Delphi? If that's the case I would expect the behavior to be identical. If the problem persists can you please attach a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |