Pre loader

How can we change XAxis to Arabic date?

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
1
0

How can we change Xaxis to Arabic date?

Version
4.4.0.4739
  • You must to post comments
Best Answer
1
0

By using custom label provider we can change date format as per our need. Set labelProvider property with the given below label provider.

class DateAxisLabelProvider : LabelFormatterBase() {

val sdf = SimpleDateFormat(“dd MMMM yyyy”, Locale(“ar”))

override fun formatLabel(p0: Double): CharSequence {
val date = Date(p0.toLong())
return sdf.format(date)
}
override fun formatCursorLabel(p0: Double): CharSequence {
val date = Date(p0.toLong())
return sdf.format(date)
}
override fun update(p0: IDateAxis?) {
}
}

Images
  • You must to post comments
1
0

Is there no one to guide me?

  • Andrew Burnett-Thompson
    Apologies Vahid, we posted an answer but it got caught in approvals & spam filter. Please check below
  • Vahid Garousi
    Don’t mention it :). It works. but i have another question. lets imagine that we have zoom feature and we want to format axis depend on user selected zoom. for example if year select yearly the pattern is yyyy MM dd and if selected zoom is day the pattern is something like this HH:mm:ss. how we can achieve to this goal?
  • Vahid Garousi
    I also mention that i use DateLabelProvider from in FinanceAndroid sdk
  • You must to post comments
0
0

Is there no one to help me?

i ask another question in comment section

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.