I am trying to align my labels in the center using:
UltraCategoryChart1.XAxisLabelHorizontalAlignment = Alignment.HorizontalCenterAlign
But they are slightly off center. It's not the end of the world, but slightly annoying. Any fix for this?
UltraCategoryChart1.XAxisInterval = 1 UltraCategoryChart1.XAxisLabelFontSize = 16 UltraCategoryChart1.XAxisLabelLeftMargin = 14 UltraCategoryChart1.XAxisLabelTextColor = New SolidColorBrush(Color.Black) UltraCategoryChart1.XAxisLabelTextStyle = FontStyle.Bold UltraCategoryChart1.XAxisLabelVisibility = Infragistics.Portable.Components.UI.Visibility.Visible UltraCategoryChart1.XAxisLabelHorizontalAlignment = Alignment.HorizontalCenterAlign
Hello Ted,
Thank you for your post. Looking onto the code looks like XAxisLabelLeftMargin is causing this behavior, as a test can you comment out XAxisLabelLeftMargin property and check if you got your x Axis labels aligned center ?
If not then do you have any other margin px set anywhere else in the project ? Can you share you demo sample for testing?
Sincerly,
Divya Jain
Yes, that was it, thank you!
To reproduce the behavior at my end I set up a sample of CategoryChart against 19.1 using the code snippets you provided and not able to reproduce the scenario. Can you update my sample and send me back for further investigation.
Just note you can set x Axis label alignment like this :
this.ultraCategoryChart1.XAxisLabelHorizontalAlignment = Infragistics.Portable.Components.UI.HorizontalAlignment.Center ;
-Divya Jain
6254.TestSample.zip