TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
JimR
- Newbie
- Posts: 46
- Joined: Mon Oct 24, 2016 12:00 am
Post
by 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 (11.62 KiB) Viewed 38136 times
-
Sandra
- Site Admin
- Posts: 3132
- Joined: Fri Nov 07, 2008 12:00 am
Post
by 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:
Hoping this helps you.
Thanks in advance
-
JimR
- Newbie
- Posts: 46
- Joined: Mon Oct 24, 2016 12:00 am
Post
by 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
-
Sandra
- Site Admin
- Posts: 3132
- Joined: Fri Nov 07, 2008 12:00 am
Post
by 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
-
JimR
- Newbie
- Posts: 46
- Joined: Mon Oct 24, 2016 12:00 am
Post
by 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
- Posts: 46
- Joined: Mon Oct 24, 2016 12:00 am
Post
by 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
- Posts: 46
- Joined: Mon Oct 24, 2016 12:00 am
Post
by 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.
-
Yeray
- Site Admin
- Posts: 9614
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by 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.
-
JimR
- Newbie
- Posts: 46
- Joined: Mon Oct 24, 2016 12:00 am
Post
by JimR » Thu Oct 12, 2017 5:19 pm
Any new updates from your colleagues regarding charts with isometric axes?
-
Marc
- Site Admin
- Posts: 1272
- Joined: Thu Oct 16, 2003 4:00 am
- Location: Girona
-
Contact:
Post
by 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
-
Yeray
- Site Admin
- Posts: 9614
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Wed Oct 18, 2017 6:55 am
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?
-
Marc
- Site Admin
- Posts: 1272
- Joined: Thu Oct 16, 2003 4:00 am
- Location: Girona
-
Contact:
Post
by Marc » Mon Oct 23, 2017 2:57 pm
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
-
Attachments
-
- ISOAxesXYZ.zip
- (1.82 MiB) Downloaded 1623 times
Steema Support
-
Marc
- Site Admin
- Posts: 1272
- Joined: Thu Oct 16, 2003 4:00 am
- Location: Girona
-
Contact:
Post
by Marc » Fri Nov 17, 2017 12:25 pm
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
Steema Support
-
Marc
- Site Admin
- Posts: 1272
- Joined: Thu Oct 16, 2003 4:00 am
- Location: Girona
-
Contact:
Post
by Marc » Wed Jan 10, 2018 10:04 am
Hi,
I should have put the src up for that demo, not just the exe, apologies; here it is.
Regards,
Marc
Steema Support