yefchak Posted August 3, 2007 Report Share Posted August 3, 2007 Hi, 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? Thanks, --George Quote Link to comment Share on other sites More sharing options...
Frank Posted August 4, 2007 Report Share Posted August 4, 2007 If you have the Pixel Coordinates you can call: chart.ZoomToWindow(x1,y1,x2,y2); If you have the "logical" coordinates of the zoom area (axis units) you can call: axis.Zoom(min,max); 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. 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.