Page 1 of 2

zoom chart

Posted: Wed Aug 16, 2017 2:50 am
by 16579481
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

Re: zoom chart

Posted: Wed Aug 16, 2017 2:23 pm
by 10050769
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

Re: zoom chart

Posted: Thu Aug 17, 2017 3:10 am
by 16579481
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

Re: zoom chart

Posted: Thu Aug 17, 2017 11:11 am
by 10050769
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

Re: zoom chart

Posted: Thu Aug 17, 2017 1:53 pm
by 16579481
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

Re: zoom chart

Posted: Fri Aug 18, 2017 8:54 am
by 10050769
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

Re: zoom chart

Posted: Fri Aug 18, 2017 8:57 pm
by 16579481
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.

Re: zoom chart

Posted: Sat Aug 19, 2017 3:08 am
by 16579481
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.

Re: zoom chart

Posted: Tue Aug 22, 2017 6:57 am
by yeray
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.

Re: zoom chart

Posted: Thu Oct 12, 2017 5:19 pm
by 16579481
Any new updates from your colleagues regarding charts with isometric axes?

Re: zoom chart

Posted: Tue Oct 17, 2017 3:26 pm
by Marc
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

Re: zoom chart

Posted: Wed Oct 18, 2017 6:55 am
by yeray
Hello,
JimR wrote:I downloaded the MakeIso3DAxis procedure from this forum in a posting a few years ago
Marc wrote: Do you have a link to the MakeIso3DAxis code you have been using? I can't locate it amongst old posts.
I can't find any reference to a MakeIso3DAxis procedure in the forums either. The most similar I find is the adaptation of MakeIsoAxis for 3D I made in VB6 a few years ago here:
http://www.teechart.net/support/viewtop ... 885#p31431

Is this what you meant?

Re: zoom chart

Posted: Mon Oct 23, 2017 2:57 pm
by Marc
Hello,

The attached ISOAxesXYZ.zip is an example project intended for feedback. Depending on the relative dimensions of the data across the X, Y and Z planes, applying ISO axes will bunch or spread the data according to the dimension of the Axis with most data and least pixel space. The demo shows the effect. This technique could be made generic in TeeChart. We are still studying variations on it.

Regards,
Marc

Re: zoom chart

Posted: Fri Nov 17, 2017 12:25 pm
by Marc
Hi,

We're not registering a huge vote in favour of implementing the technique described in the previous post as a means to force ISO axes across x,y,z planes. As such, as we're finalising inclusions for the next update, we consider it wiser for the moment to leave the approach external to TeeChart, at least for the near term future. The approach described in the example project can be used in any TeeChart end project scenario.

Regards,
Marc

Re: zoom chart

Posted: Wed Jan 10, 2018 10:04 am
by Marc
Hi,

I should have put the src up for that demo, not just the exe, apologies; here it is.

Regards,
Marc
ISOAxisSrc.zip
(5.06 KiB) Downloaded 1577 times