AnthonyJones Posted January 5, 2010 Report Share Posted January 5, 2010 Part of our application uses ChartFX to show line graphs which have a horizontal axis showing a measurement of time. The customer needs to be able to highlight a section of the graph with the mouse and have that section expand to fill the visible graph area (e.g. "zoom" to a particular range of dates). I've been asked to post here to find out: a) Is such a thing possible with the ChartFX control? Is there any example code available if so? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
JuanC Posted January 5, 2010 Report Share Posted January 5, 2010 We do not have a UI to trigger the start of the selection but if you add a button that executes this code chart1.Zoom.Mode = ZoomMode.Selection We will then allow the user to select the interesting area and zoom it. There is also a property in Zoom called Style that controls different zoom strategies. JuanC Quote Link to comment Share on other sites More sharing options...
MMCCPaulEden Posted January 11, 2010 Report Share Posted January 11, 2010 Hi Are there any working examples of this? The line above is dependant on an area being selected - is there additional code required to activate this? Thanks Paul Quote Link to comment Share on other sites More sharing options...
JuanC Posted January 11, 2010 Report Share Posted January 11, 2010 When you set Mode to Selection we start the selection process, so at that point the user will be able to select the area and zoom will happen when the mouse is up. No additional code is required. JuanC Quote Link to comment Share on other sites More sharing options...
MMCCPaulEden Posted January 11, 2010 Report Share Posted January 11, 2010 Are there any circumstances where this would not be the case (use of styles, setting the flag pre-visual rendering etc). Having put the previous line in place, nothing happens when the mouse is drag-clicked within the chart data area. Thanks Quote Link to comment Share on other sites More sharing options...
JuanC Posted January 11, 2010 Report Share Posted January 11, 2010 We are not aware of any particular settings (including styling or using AdvanvedSettings) that would prevent this from working. Can you duplicate this issue in a dummy app? JuanC Quote Link to comment Share on other sites More sharing options...
MMCCPaulEden Posted January 13, 2010 Report Share Posted January 13, 2010 Hi Sample project attached. Thanks. Quote Link to comment Share on other sites More sharing options...
MMCCPaulEden Posted February 12, 2010 Report Share Posted February 12, 2010 For anyone interested, this was caused by attempting to set this at point of control instancing. Zoom mode can only be enabled after the control has been added and as such needs to be trigered via a button or context menu. It is also necessary to set the style property, as opposed to just needing to set it if you want to change it (while "Auto" is a Style option it is not set to this by default). Paul Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.