Jump to content
Software FX Community

Zoom to graph area


Recommended Posts

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?

B) Is there any example code available if so?

 Thanks in advance.

Link to comment
Share on other sites

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.


Link to comment
Share on other sites

  • 5 weeks later...

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).




Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...