Pre loader

Multiline Axis Tick Label Alignment

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

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.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies