This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi Jason, Essentially I wish to be able to hold the control button and drag across the chart for it to zoom in. I've been trying for a while with no luck. Do you have any ideas on this? I will continue to work on it in the mean time. Thanks. |
|
|
Hi Jason, I've had no luck with this one. When I hold control the zoom box won't show up for me. I can catch the even but can't seem to get the zoom box up. Any input on this? Thanks. |
|
|
Hi Klogue, First I'd just like to check if you're aware that the Chart has a built in zoom-box feature. This can be enabled by setting the ZoomMode property of the Chart control. Zooming can be done by dragging the mouse on the chart without holding the Ctrl key. Dragging while holding the Ctrl key will perform a pan operation. This functionality unfortunately is hard coded into the chart input event handlers. Do you require Ctrl to be held to zoom? -Jason Fauchelle |
|
|
Hi Jason, Apologies, I was just using that as an example. I just want to add a function where I hold control. It does not need to be control if this key is in use. I just need an alternate zoombox style to occur when I am holding a specific key. Thanks. |
|
|
Hi Jason, I got what I wanted using an alternate key. Another question though. When I am loading a chart it seems to load before the points are plotted or rendered. I have the charts visibility bound to a bool and I have tried to put it in a loaded method and finished plotting points method so the bool would only get set to true in here but neither seem to work. Is there something specific I need to do? Thanks. |
|
|
Hi Klogue, Good to hear you got the keyboard control working. Detecting when the chart has loaded the data is a bit tricky due to the plotting operation being dispatched. The best thing to try would be listening to the FinishedPlottingData event on the Chart control which should let you know when the data has been displayed. Hope that works for what you need. -Jason Fauchelle |
|
|
Hi Jason, Thanks for the reply. I have it more or less working i=with the FinishedPlottingData. I just realised I forgot to ask this a while back. I have a hidden line series and I only wish it to show when a button is clicked. It works fine only when I am zoomed in on the graph and set the bool to true to show the line series, it zooms out. I need it to stay zoomed it. Is there a way to suppress the zoom out or something along these lines? Thanks. |
|
|
Hi Klogue, Have a go at setting the IsAutoViewportEnabled property on each ChartAxis to false before changing the visibility of the series, and then set it back to true afterwards. This is supposed to prevent the chart from updating the viewport when something changes. I have not tried it in this scenario though. If that doesn't work, you'll need to try recording the ActualMinimum and ActualMaximum of each axis and restoring those. I hope that will help you getting it to work. -Jason Fauchelle |
|