Keep the chart in 2D view when moving or rotating.
Keep the chart in 2D view when moving or rotating.
Hello,
When move or rotate a chart using TeeCommander, the original 2D chart becomes a 3D chart by itself. How to keep a chart in 2D view when it been moved or rotated?
Best regards,
Xiushan
When move or rotate a chart using TeeCommander, the original 2D chart becomes a 3D chart by itself. How to keep a chart in 2D view when it been moved or rotated?
Best regards,
Xiushan
Re: Keep the chart in 2D view when moving or rotating.
Please find the attached files.
- Attachments
-
- fig2.jpg (42.59 KiB) Viewed 13597 times
-
- Fig1.jpg (35.83 KiB) Viewed 13584 times
Re: Keep the chart in 2D view when moving or rotating.
Hello,
That's a limitation on the rotation feature. It requires the chart to be in 3D to take effect.
Some alternatives I see:
- Set the Chart3DPercent to 0:
- Change your TLineSeries for TFastLineSeries.
That's a limitation on the rotation feature. It requires the chart to be in 3D to take effect.
Some alternatives I see:
- Set the Chart3DPercent to 0:
Code: Select all
Chart1.Chart3DPercent:=0;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Keep the chart in 2D view when moving or rotating.
Using TeeCommander to move, rotate or zoom, the chart properties (such as series color) change.
- Attachments
-
- 2.jpg (29.37 KiB) Viewed 13563 times
-
- 1.jpg (38.47 KiB) Viewed 13556 times
Re: Keep the chart in 2D view when moving or rotating.
Hello,
The second approach - using a TFastLineSeries instead of a TLineSeries - may make more sense in this case.
If you are using the first approach - using a TLineSeries with Chart3DPercent=0 - I'd suggest you to also set the series' LinePen.Color to be the series' Color. Ie:sripe wrote:Using TeeCommander to move, rotate or zoom, the chart properties (such as series color) change.
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
Chart1.Chart3DPercent:=0;
with Chart1.AddSeries(TLineSeries) as TLineSeries do
begin
FillSampleValues;
LinePen.Color:=Color;
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Keep the chart in 2D view when moving or rotating.
Using the first approach, and the FormCreate procedure as follows:
It works well with TLineSeries. But, using TeeCommander to move, rotate or zoom TPolarSeries, there are two problems:
1. When moving or zooming the chart, it inclines (tilts, leans) by itself. (see Fig1)
2. When rotating the chart, the selected series (there is a ChartListBox1 on the Form, and ChartListBox1.SelectedSeries is active) and the Chart rotate, but the other PolarSeries do not follow the rotating command. (see Fig2)
Code: Select all
procedure Tform1.FormCreate(Sender: TObject);
begin
with Chart1 do
begin
View3D := false;
View3DWalls := false;
Chart3DPercent := 0;
View3DOptions.Rotation := 0;
View3DOptions.Elevation := 360;
View3DOptions.Perspective := 0;
end;
end;
1. When moving or zooming the chart, it inclines (tilts, leans) by itself. (see Fig1)
2. When rotating the chart, the selected series (there is a ChartListBox1 on the Form, and ChartListBox1.SelectedSeries is active) and the Chart rotate, but the other PolarSeries do not follow the rotating command. (see Fig2)
- Attachments
-
- Fig2.jpg (339.91 KiB) Viewed 13547 times
-
- Fig1.jpg (320.31 KiB) Viewed 13535 times
-
- Original.jpg (336.67 KiB) Viewed 13525 times
Re: Keep the chart in 2D view when moving or rotating.
Hello,
I've only placed a TChart and a TTeeCommander on a form and I use this code:
http://bugs.teechart.net/show_bug.cgi?id=1423
I see it moving/zooming deactivates the 3D, but other than that I can move/zoom the chart around without problems:sripe wrote:1. When moving or zooming the chart, it inclines (tilts, leans) by itself. (see Fig1)
I've only placed a TChart and a TTeeCommander on a form and I use this code:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
with Chart1 do
begin
//View3D := false;
Chart3DPercent := 0;
Gradient.Visible:=false;
Title.Visible:=false;
Legend.Visible:=false;
end;
for i:=0 to 1 do
with Chart1.AddSeries(TPolarSeries) as TPolarSeries do
begin
FillSampleValues;
Pointer.Visible:=false;
Brush.Clear;
CircleBrush.Clear;
Pen.Color:=Color;
Pen.Width:=2;
end;
end;
I've added it to the public tracker:sripe wrote:2. When rotating the chart, the selected series (there is a ChartListBox1 on the Form, and ChartListBox1.SelectedSeries is active) and the Chart rotate, but the other PolarSeries do not follow the rotating command. (see Fig2)
http://bugs.teechart.net/show_bug.cgi?id=1423
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Keep the chart in 2D view when moving or rotating.
Please press move or zoom button to test.
- Attachments
-
- Example4.zip
- (6.88 KiB) Downloaded 592 times
Re: Keep the chart in 2D view when moving or rotating.
Hello,
This is because when you start moving the chart it changes to 3D and the other properties (Elevation, Rotation, Orthogonal,...) take effect
Try setting Orthogonal to true or Elevation and Rotation to 360 after creating the series. Ie:
This is because when you start moving the chart it changes to 3D and the other properties (Elevation, Rotation, Orthogonal,...) take effect
Try setting Orthogonal to true or Elevation and Rotation to 360 after creating the series. Ie:
Code: Select all
with Chart1 do
begin
//Aspect.Orthogonal:=true;
Aspect.Elevation:=360;
Aspect.Rotation:=360;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Keep the chart in 2D view when moving or rotating.
Using TPolarSeries, it seems that the four axes (RightAxis, LeftAxis, TopAxis and BottomAxis) do not intersect the same point at the center, although I use the following codes to make the chart show in 2D view.
with Chart1 do
begin
View3D := false;
View3DWalls := false;
Chart3DPercent := 0;
Aspect.Rotation := 360;
Aspect.Elevation := 360;
Aspect.Perspective := 0;
Gradient.Visible := true;
end;
How to make the four axes just right meet at the centre of a circle?
with Chart1 do
begin
View3D := false;
View3DWalls := false;
Chart3DPercent := 0;
Aspect.Rotation := 360;
Aspect.Elevation := 360;
Aspect.Perspective := 0;
Gradient.Visible := true;
end;
How to make the four axes just right meet at the centre of a circle?
- Attachments
-
- www.jpg (241.13 KiB) Viewed 13476 times
Re: Keep the chart in 2D view when moving or rotating.
Hello,
http://bugs.teechart.net/show_bug.cgi?id=1439
I see. I've added it to the public tracker:sripe wrote:Using TPolarSeries, it seems that the four axes (RightAxis, LeftAxis, TopAxis and BottomAxis) do not intersect the same point at the center, although I use the following codes to make the chart show in 2D view.
http://bugs.teechart.net/show_bug.cgi?id=1439
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |