thubble Posted May 20, 2009 Report Share Posted May 20, 2009 In pre-WPF versions of ChartFX, there was the ability to hardcode the PixPerUnit value for the X axis so that when the chart is resized to be smaller, the number of points displayed will be constant until there are too many points to display at the current PixPerUnit value. In ChartFX for WPF, the PixPerUnit property seems to have been removed, so the only option is to use SetScrollView. The problem is that SetScrollView always sets the PixPerUnit based on the current size of the chart. So for example, if the chart is very large and there are only 2 points displayed, the points will be huge on the screen. This is fine, except that when the chart is made smaller, the points will remain huge and a scrollbar will appear with only one point displayed. Is there any way to preserve the old behaviour, i.e. that the points will get smaller until there are too many to display at the current PixPerUnit, and only then will the scrollbar appear? The only solution I've found is to call SetScrollView from the chart's SizeChanged event, and this is definitely not ideal. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
JuanC Posted May 22, 2009 Report Share Posted May 22, 2009 We have added the PixelsPerUnit to the Axis class retaining the old (WinForms, ASP.NET) behavior. A hotfix will be available early next week with support for this. Regards, JuanC Quote Link to comment Share on other sites More sharing options...
JuanC Posted June 1, 2009 Report Share Posted June 1, 2009 A hotfix is now available that includes support for this new property. You can download our most recent hotfix here. Regards, JuanC Quote Link to comment Share on other sites More sharing options...
thubble Posted June 3, 2009 Author Report Share Posted June 3, 2009 Using version 3439 - AxisX.PixelsPerUnit works when you first set it (either through XAML or through Code) but if you change the data (either by assigning a new binding source or changing the existing one) it crashes with the error: "'Infinity' is not a valid value for property 'LargeChange'." This seems to happen mostly when there is a scrollbar showing on the X axis, but sometimes even when there's not. I've tried putting "AxisX.SetScrollView(0,0)" before changing the data, it still doesn't work. Any ideas? Quote Link to comment Share on other sites More sharing options...
thubble Posted June 4, 2009 Author Report Share Posted June 4, 2009 It looks like the above bug also happens when you use SetScrollView(). If you have a chart that does not have a scroll bar with the current ScrollView, then you change the data so that it needs a scrollbar (by adding more points) and call .Refresh(), it crashes with the error: "'Infinity' is not a valid value for property 'LargeChange'." Quote Link to comment Share on other sites More sharing options...
thubble Posted June 9, 2009 Author Report Share Posted June 9, 2009 This seems to be fixed in build 3442 - thanks! 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.