How can we change Xaxis to Arabic date?
- Vahid Garousi asked 2 years ago
- last edited 2 years ago
- You must login to post comments
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?) {
}
}
- Maulik Senghani answered 2 years ago
- last edited 2 years ago
- You must login to post comments
Is there no one to guide me?
- Vahid Garousi answered 2 years ago
- Apologies Vahid, we posted an answer but it got caught in approvals & spam filter. Please check below
- 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?
- I also mention that i use DateLabelProvider from in FinanceAndroid sdk
- You must login to post comments
Is there no one to help me?
i ask another question in comment section
- Vahid Garousi answered 2 years ago
- You must login to post comments
Please login first to submit.