Pre loader

How do i display XAxis label from an array of strings

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

1
0

I am working on Android Application and I have a different requirement where I want to display all the values String array on XAxis, I don’t want to use DateAxis nor VisibleRange function, also no value should be hidden as we are not giving any zoom-in and out functionality in our app.

I would really appreciate if you can please assist with this

Thanks
Regard

Version
V3
  • You must to post comments
0
0

Hi Yasir

In order to display strings on axis in SciChart Android you need to use the LabelProvider feature.

What you do:

  • Add your data into the XyDataSeries with X-Values equal to 0,1,2,3,4 …
  • Create a custom LabelProvider and attach it to the XAxis
  • Use this LabelProvider to convert from the numberical value (0,1,2,3,…) to desired string

There are a few examples of LabelProvider in our Android Examples suite.

1/ Java LabelProvider example
2/ Kotlin LabelProvider example

This second example shows a simple mapping of number to string.

Let me know if this helps

Best regards,
Andrew

  • 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