how to rotate charts with mouse?
how to rotate charts with mouse?
In the TeeCommander panel, there's a button that lets you rotate the charts with the mouse. I want to add this to a chart without requiring the TeeCommander panel. What is needed to do this?
Hi David,
this functionality can be added adding the Rotate Tool to the Chart.
this functionality can be added adding the Rotate Tool to the Chart.
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi David,
to add the Rotate tool at design time you must edit the Chart (double click on it), go to the Tools Tab and click "Add" button, go to the Other tab and you will see it.
Or you can always add it at runtime using :
uses TeeTools;
Chart1.Tools.Add(TrotateTool.Create(self));
to add the Rotate tool at design time you must edit the Chart (double click on it), go to the Tools Tab and click "Add" button, go to the Other tab and you will see it.
Or you can always add it at runtime using :
uses TeeTools;
Chart1.Tools.Add(TrotateTool.Create(self));
Pep Jorge
http://support.steema.com
http://support.steema.com
Sorry, I guess I'm not being clear. I want to add a button and/or menu item to my application that behaves like the button on TeeCommander, so that when you depress it, you can use the mouse to rotate the chart in 3D mode. We're trying to AVOID using the chart editor because our users tend to find it far too complex and intimidating. So I'm identifying commonly used chart functions and adding them to our toolbar and menus.
I looked at the code in TeeCommander, and it appears to implement the panning, rotating, and similar functions, entirely within the OnMouseDown event handler, triggering off of the state of certain (mutually exclusive) buttons. Would it be sufficient to simply copy this event handler code into my form that contains the TChart (I guess it would go into the TChart's OnMouseDown handler)? Or is there another method?
-David
I looked at the code in TeeCommander, and it appears to implement the panning, rotating, and similar functions, entirely within the OnMouseDown event handler, triggering off of the state of certain (mutually exclusive) buttons. Would it be sufficient to simply copy this event handler code into my form that contains the TChart (I guess it would go into the TChart's OnMouseDown handler)? Or is there another method?
-David
Hi David,
Or you can have created some functionalities like "Rotate", using the Tool and then Acitvate or not in some cases.
Yes, you should be able to sue the same code in the OnMouseDown event of TChart.my form that contains the TChart (I guess it would go into the TChart's OnMouseDown handler)? Or is there another method?
Or you can have created some functionalities like "Rotate", using the Tool and then Acitvate or not in some cases.
Pep Jorge
http://support.steema.com
http://support.steema.com