Pre loader

How to set Locale for the SCIDateTimeAxis.

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

0
0

I am setting SCIDateTimeAxis as my XAxis by using the code:

let xAxis = SCIDateTimeAxis()
xAxis.style.labelStyle.color = UIColor.darkGray
xAxis.textFormatting = “dd MMM”
xAxis.visibleRange = SCIDateRange(dateMin: 2019-07-29 11:30:00, max:2019-07-29 11:30:00)

As I have a requirement to change the application Language to THI.
How can I set the locale to the axis, so the label visible on the axis should displayed in THI language.

As right now it is always visible in english irrespective of the language like 1 sep, 20 sep, 10 oct, 30 oct, 20 nov .

Please help.

Thanks
Vikas Ahuja

Version
2.5.0.2601
  • You must to post comments
0
0

Hello,

First of, please upgrade to v3 of the SciChart.iOS, so we can provide up-to date support.
From there – on date axis, you can specify custom label provider\formatter with proper locale, please see our API documentation

I’ve added the following label provider into our Mountain Chart Example,

    let labelFormatter = SCIDateLabelFormatter(locale: Locale(identifier: "th_TH"), timeZone: TimeZone.current)
    xAxis.labelProvider = SCIDateLabelProvider(labelFormatter: labelFormatter)

Please see output in the attachments.
Hope that helps.

Best Regards,
Nazar R.

Images
  • 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