zoom chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.

zoom chart

Postby JimR » Wed Aug 16, 2017 2:50 am

When I open the plot edit tool in my program, I find that under chart | general | mouse one can select 'zoom chart' in the wheel group box (see screenshot below).

How can one do this programmatically?

I have found I can modify properties such as:
Code: Select all
  Chart.Zoom.allow := true;
  Chart.Panning.MouseWheel := pmwNone;
  Chart.Zoom.MouseWheel := pmwNormal;

But this just allows one to zoom just the data with the mouse wheel, not the chart. How can one specify zooming the chart rather than just the data?

Note: i would like to do this for both 2D and 3D point data if that makes a difference.

Thanks,

Jim
Attachments
Edit_zoom.PNG
Edit_zoom.PNG (11.62 KiB) Viewed 234 times
JimR
Newbie
Newbie
 
Posts: 23
Joined: Mon Oct 24, 2016 12:00 am

Re: zoom chart

Postby Sandra » Wed Aug 16, 2017 2:23 pm

Hello Jim,

If you want zoom the Chart instead of Data, you need use Chart1.ZoomWheel property instead of Chart1.Zoom.MouseWheel. You should do the same as next line code:
Code: Select all
  Chart1.ZoomWheel:= pmwnormal;


Hoping this helps you.
Thanks in advance
Best Regards,

Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum
Sandra
Site Admin
Site Admin
 
Posts: 3081
Joined: Fri Nov 07, 2008 12:00 am

Re: zoom chart

Postby JimR » Thu Aug 17, 2017 3:10 am

Thanks must be some additional settings needed as it does not work for me - it still zooms the data and not the chart.

I am now using
chart.Zoom.Allow := true;
Chart.Zoom.MouseWheel := pmwNormal;
chart.ZoomWheel := pmwNormal;
Chart.BottomAxis.LabelStyle := talValue;

Without Chart.Panning.MouseWheel := pmwNone; it just scrolls despite the other settings so that is needed. I have also tried several combinations of the other statements with no change in the results.

If I use the edit tool to set it to zoom the chart then it works fine but i need to set it programmatically. There must be something else I have to set or unset.

Jim
JimR
Newbie
Newbie
 
Posts: 23
Joined: Mon Oct 24, 2016 12:00 am

Re: zoom chart

Postby Sandra » Thu Aug 17, 2017 11:11 am

Hello Jim,

You should disable the Data Zoom . I have modified your simple code because it works in your end. The modifications are shown below:

Code: Select all
chart.Zoom.Allow := true;
Chart.Zoom.MouseWheel := pmwNone;
chart.ZoomWheel := pmwNormal;
Chart.BottomAxis.LabelStyle := talValue;


Hoping this helps you.
Thanks in advance
Best Regards,

Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum
Sandra
Site Admin
Site Admin
 
Posts: 3081
Joined: Fri Nov 07, 2008 12:00 am

Re: zoom chart

Postby JimR » Thu Aug 17, 2017 1:53 pm

Excellent - that works!

Now the main problem i have put off trying to solve is getting isometric axes for a 3D point plot. I downloaded the MakeIso3DAxis procedure from this forum in a posting a few years ago. It can create isometric axes but then it always greatly expands the scale for the axes so I have a little isometric plot within a large chart. It also does not make it isometric until one resizes the chart (I saw that same comment from others). What is the most recent solution to this problem?

Using the MakeIsoAxis procedure I can make 2D isometric point plots but again it seems to require a resize of the form and also makes the plot too small. What is the most current solution?

Jim
JimR
Newbie
Newbie
 
Posts: 23
Joined: Mon Oct 24, 2016 12:00 am

Re: zoom chart

Postby Sandra » Fri Aug 18, 2017 8:54 am

Hello Jim,

As we told you years ago the problem isn't closed. I have increased againt the severity to review as soon as possible. Here's the link http://bugs.teechart.net/show_bug.cgi?id=1344

Thanks in advance
Best Regards,

Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum
Sandra
Site Admin
Site Admin
 
Posts: 3081
Joined: Fri Nov 07, 2008 12:00 am

Re: zoom chart

Postby JimR » Fri Aug 18, 2017 8:57 pm

I was really counting on the problem would be solved by now. It is a very fundamental issue for many scientific and engineering applications. I have now invested so much time in creating the various plots needed in my software it would be difficult to now convert to some other graphics package - but I may have to because isometric plots are essential. My users will not use my software if the plots are not exactly isometric.
JimR
Newbie
Newbie
 
Posts: 23
Joined: Mon Oct 24, 2016 12:00 am

Re: zoom chart

Postby JimR » Sat Aug 19, 2017 3:08 am

Perhaps you could answer a few questions.

Is it possible to make changes to the ChartRect? To make an isometric plot keeping user specified scales for X and Y one needs to adjust the lengths of the axes. The procedures I downloaded from the forum make adjustments to the chart.width and chart.height but those include space for the titles, axis labels, etc. which are not relevant to making a plot isometric. One solution would be to shorten one of the axes as appropriate to make the plot isometric. I could then adjust the form width or height to compensate. Alternatively, could one add a margin at the right or bottom of the plot so that the actual ChartRect would thus be forced to be a desired size? It seems that one needs some access to the internals of TeeChart to accomplish a proper isometric plot. The 3D case will, of course, be even more complex but I would first like to solve the 2D case.
JimR
Newbie
Newbie
 
Posts: 23
Joined: Mon Oct 24, 2016 12:00 am

Re: zoom chart

Postby Yeray » Tue Aug 22, 2017 6:57 am

Hello,

I agree it would be a nice feature if all the necessary calculations to maintain the Isometric Axes could be done internally activating just some property. I'll try to review the possibilities we have with my colleagues.

About the ChartRect, I see some examples here and here.
Best Regards,

ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image ImagePlease read our Bug Fixing Policy
Yeray
Site Admin
Site Admin
 
Posts: 8120
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Re: zoom chart

Postby JimR » Thu Oct 12, 2017 5:19 pm

Any new updates from your colleagues regarding charts with isometric axes?
JimR
Newbie
Newbie
 
Posts: 23
Joined: Mon Oct 24, 2016 12:00 am

Re: zoom chart

Postby Marc » Tue Oct 17, 2017 3:26 pm

Hello,

We're checking status to try and get a definitive solution to you and will get back to this thread shortly. Do you have a link to the MakeIso3DAxis code you have been using? I can't locate it amongst old posts.

With thanks.
Regards,
Marc Meumann
Steema Support
Marc
Site Admin
Site Admin
 
Posts: 806
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona


Return to VCL

Who is online

Users browsing this forum: No registered users and 8 guests