when loading first data everything goes fine
growby max padding as expected (Image1)
but i added realtime data and data grow, it show strange behaviour, padding more than i expected. (image2)
final IAxis xAxis = sciChartBuilder.newCategoryDateAxis().withVisibleRange(xVisibleRange).withGrowBy(0.1,0.1).build(); ZoomPanModifier zoomPanModifier = new ZoomPanModifier(); zoomPanModifier.setClipModeX(ClipMode.ClipAtExtents); zoomPanModifier.setClipModeTargetX(ClipModeTarget.MaximumRange);
any workaround? thanks
May I ask how many points do you have? GrowBy in X direction adds additional space based on amount of all points that your data series have. So for example if you set GrowBy = (0.1, 0.1) this means to add additional 10% of space occupied by data in X direction. If you have 201 points and use category axis then your data will rendered in range from 0 to 200, then after applying GrowBy with additonal 10% from each side MaximumRange will be (-20, 220). If you zoom deep enough using PinchZoomModifier or just set VisibleRange, for example (190, 210), and then try to pan chart you may see picture like on your screenshot, because ZoomPanModifier doesn’t limit size of viewport window ( diff between max and min of VisibleRange for axis). This is how it works by default. If you don’t want this behavior I would suggest you to try to limit depth of zoom to prevent this by using MinimalZoomConstrain.
Please login first to submit.