hasanma Posted August 9, 2007 Report Share Posted August 9, 2007 I'm binding 1000 points to the chart. I see new points as I scroll the chart. Is there any function that will give the number of points displayed on the screen? Quote Link to comment Share on other sites More sharing options...
Frank Posted August 11, 2007 Report Share Posted August 11, 2007 The answer to this question depends on the type of chart. If the X-Axis is categorical, you are not passing X-Values, the number of points and the scroll range are directly related, there is one point for each X-Axis unit. In this case obtaining the number of points within the current view can be done using the GetScrollView method in the X-Axis: chart.AxisX.GetScrollView(out min, out max); Note the GetScrollView returns the current view, therefore it can only be called after the scroll size and scale is calculated, that is after the chart is displayed. If you need to obtain this information before the chart is ever drawn, you need to force a size update before calling GetScrollView. The method UpdateSizeNow will do this for you. If on the other hand your chart is an X/Y chart, the number of points and the X-Axis range are not related. The only way to obtain this number is to count the points. You can get the min and max using GetScrollView and then go through the points and test for their X-Value being within this range. 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.