SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components

Answered
0
0

Hello again,

Pardon me if I’m missing something obvious, but I am trying to center align a multiline tick label. I want both lines of the label to be centered. By default they seem to be left-justified. See attached image of current behavior.

xAxis = DateAxis(this)
xAxis.textFormatting = "h:mma\nMMM d" 

Thank you.

Version
4.2.0.4557
Images
  • You must to post comments
Best Answer
0
0

Hi there,

Please try to set AxisTickLabelStyle with Layout.Alignment.ALIGN_CENTER:

xAxis.setAxisTickLabelStyle(new AxisTickLabelStyle(Gravity.CENTER,  Layout.Alignment.ALIGN_CENTER, 5, 0, 5, 0));

Hope this will help you!

Best regards,
Yura

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.