I'm using v8 ActiveX with VC6 in an MFC application.
I'm drawing a surface series representing topographical data and I'm adjusting Chart3DPercent or TimesZOrder to get my X / Y data roughly in proportion. I 'm adding a 'Rotate' tool in code too.
This seems to work reasonably well, but the initial update of my dialog (when it first opens) is 'wrong':
You can see that it isn't in the correct proportions.
If I then use the rotate tool to fractionally move the graph (the slightest click and drag), it "pops" to the correct size:
So, I have two questions...
1) How do I make my chart appear correctly as soon as my dialog opens?
I've tried RefreshData, Repaint, InternalRepaint and they don't work.
2) Is there any way to check if my whole chart is visible or to make sure that it is visible straight away i.e., auto-set the zoom so we can see the whole chart like this:
Initial Update Problem
Post fairy strikes again...
OK, so I discovered the answer to the first problem...I needed to make sure 'Orthogonal' was not set initially.
But I'd still welcome ideas on the auto-zooming thing....
Cheers
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis,
I appreciate the use of the zoom property, but I was wondering if the control 'knows' when it isn't displaying the full chart. In the example above, my chart is initially displaying as in the second picture and it is necessary to zoom out a little bit to see the whole thing (as in the third picture). I've attached the zoom to my mouse wheel, so that isn't too hard, but I would like it if the whole chart would be displayed first.
So, is it possible to tell if the drawing area of the panel is larger than the control? Or some way of telling that the whol chart is not displayed so that I can automatically zoom out to see the whole thing?
I appreciate the use of the zoom property, but I was wondering if the control 'knows' when it isn't displaying the full chart. In the example above, my chart is initially displaying as in the second picture and it is necessary to zoom out a little bit to see the whole thing (as in the third picture). I've attached the zoom to my mouse wheel, so that isn't too hard, but I would like it if the whole chart would be displayed first.
So, is it possible to tell if the drawing area of the panel is larger than the control? Or some way of telling that the whol chart is not displayed so that I can automatically zoom out to see the whole thing?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi LVL,
The only solution I can think of is checking if all axes fit in chart's plotting area and if they don't unzoom the chart a little bit.
You can obtain axes size like this:
You could try implementing this in the OnAfterDraw event.
Hope this helps!
The only solution I can think of is checking if all axes fit in chart's plotting area and if they don't unzoom the chart a little bit.
You can obtain axes size like this:
Code: Select all
TChart1.Axis.Bottom.IAxisSize
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |