I have a problem with T-Chart 2010 on zooming with multiple Y axes. When I zoom, it zooms all the waveforms to a common y-axis. I loose the various scalings on the independent axes. I can turn off vertical zooming and the horizontal zooming works correctly for my single x-axis, but I would like to be able to zoom the same way I could with the RAD Studio 2007 version of the TChart component. Is there a setting to enable this? As I am upgrading to 2010, I have had to copy and pastes the charts in my applications to get the projects to compile without errors. Has this copy and paste changed the default zoom settings. It did add a gradient to my panel backgrounds that I had to remove. Is there a bug here?
Thanks for your help!
Zooming with Multiple Y axes in TChart 2010
-
- Newbie
- Posts: 5
- Joined: Fri Jul 09, 2010 12:00 am
Re: Zooming with Multiple Y axes in TChart 2010
Hi JMX Services,
Here it is an example:
I doesn't affect project upgrades from previous versions as this info is stored in the dfm.
The zoom for Custom axis has to be done manually calling SetMinMax routine at OnZoom and UndoZoom as explainmed in this FAQ.JMX Services wrote:I have a problem with T-Chart 2010 on zooming with multiple Y axes. When I zoom, it zooms all the waveforms to a common y-axis. I loose the various scalings on the independent axes. I can turn off vertical zooming and the horizontal zooming works correctly for my single x-axis, but I would like to be able to zoom the same way I could with the RAD Studio 2007 version of the TChart component. Is there a setting to enable this?
Here it is an example:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
Chart1.View3D:=false;
for i:=0 to 3 do
begin
Chart1.AddSeries(TFastLineSeries);
Chart1[i].FillSampleValues();
Chart1.CustomAxes.Add;
Chart1[i].CustomVertAxis:=Chart1.CustomAxes[i];
end;
end;
procedure TForm1.Chart1UndoZoom(Sender: TObject);
var i: Integer;
begin
for i:=0 to Chart1.CustomAxes.Count-1 do
with Chart1.CustomAxes[i] do Automatic:=true;
end;
procedure TForm1.Chart1Zoom(Sender: TObject);
var i: Integer;
begin
for i:=0 to Chart1.CustomAxes.Count-1 do
with Chart1.CustomAxes[i] do SetMinMax(CalcPosPoint(Chart1.Zoom.Y1),CalcPosPoint(Chart1.Zoom.Y0));
end;
You could simply open your RAD 2007 projects in RAD 2010, can't you? This way the neither the code or the forms should be changed.JMX Services wrote:As I am upgrading to 2010, I have had to copy and pastes the charts in my applications to get the projects to compile without errors.
Dropping a chart into a form, it adds a chart with a gradient in the panel since TeeChart VCL 2010. That was made to improve the appearance of the initial charts. A similar improvement was made in TeeChart v8 when the initial palette passed to be the OperaPalette.JMX Services wrote:Has this copy and paste changed the default zoom settings. It did add a gradient to my panel backgrounds that I had to remove. Is there a bug here?
I doesn't affect project upgrades from previous versions as this info is stored in the dfm.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |