Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
Extent Adjustment Not Working?
posted

I'm trying to adjust the X Extent of one of our charts in order to provide some margin between the X-axis labels and the bottom of the control/form.

Here's the code I'm using to adjust the intent.

<code snippet>
Dim xAxisClipBehavior As New ClipTextAxisLabelLayoutBehavior
xAxisClipBehavior.ClipText = True
xAxisClipBehavior.Enabled = True
xAxisClipBehavior.EnableRollback = True
xAxisClipBehavior.HideText = False
xAxisClipBehavior.Trimming = StringTrimming.EllipsisCharacter
xAxisClipBehavior.UseOnlyToPreventCollisions = False

chtStatsChart.Axis.X.Labels.Layout.Behavior = AxisLabelLayoutBehaviors.UseCollection
chtStatsChart.Axis.X.Labels.Layout.BehaviorCollection.Clear()
chtStatsChart.Axis.X.Labels.Layout.BehaviorCollection.Add(xAxisClipBehavior)

chtStatsChart.Axis.X.Extent = chtStatsChart.Axis.X.Extent + 80
</code snippet>

This works fine on my machine and I get the expected results.  However on some of my co-workers machines, there is still no bottom margin and some of the x-axis labels are even being cut off.

Here are some screenshots to show examples.

This screenshot is from my machine - you can see it's working:

This is a screenshot from a teammates system - obviously it's not working there:

 I'm not sure why it's working on my system and not on others....any thoughts?

Any assistance would be appreciated!

Parents Reply Children