Jump to content
Software FX Community

Custom zooming w/o toolbar?


Recommended Posts


 I'm just getting started with ChartFX, and I love it.  What I'd like to do, however, is implement my own UI for zooming (via capturing the MouseUp/Down events, etc.).  Is there a way I can send a custom zoom range to the chart so it will zoom in and generate the appropriate scrollbars, etc?

 Also, I'm curious as to the preferred way to send datasets of, say 1000 points to the chart.  Right now I'm making 1000 API calls to Chart.Data.X() and Chart.Data.Y().  Is this the best way?



Link to comment
Share on other sites

If you have the Pixel Coordinates you can call:


If you have the "logical" coordinates of the zoom area (axis units) you can call:


As for passing data. There is really not a lot of overhead in calling the API provided the code is well written. If your data is not already in one of the supported data sources (arrays, data tables, etc.) using the API is the best (as far as performance) way to go. Actually in almost any case using the API is faster than any other way since your code will be specific to your data while our will be generic.

One tip to improve the performance of passing your data: Set the number of series and points before you start. Dynamically changing the number of points and series as you go will impact the performance significantly.

In the other hand, 1000 points is really not much, most performance differences in this case would be unnoticeable. If you go into the 100,000's points then you can see the difference.

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