Pre loader

Tag: label format

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 votes
9k views

hi,
I am currently trying to implement a chart with a category datetime axis. I custom a label formatter for handling a custom datetime format, let say”yyyy/MM”. Only the 1st tick of each year will display the label.
Eg: data with[“2018/1”,“2018/3”,“2018/5”], only show 2018/1, others show with empty/no label

I find the overrided method of label and cursor label formatter have only returned Comparable object which should be only returned the current rederering datetime axis label’s date.
Is there any way to find the previous one label to compare or any suggestion for implement this axis? Thank you!

  • may lym asked 5 years ago
  • last active 5 years ago
0 votes
9k views

I try to make a text formatting for my chart on IOS and Android, regarding your documentation:

IOS:
https://www.scichart.com/documentation/ios/current/axis-labels—textformatting-and-cursortextformatting.html
yAxis.textFormatting = “$0.0”

Android:
https://www.scichart.com/documentation/android/current/Axis%20Labels%20-%20TextFormatting%20and%20CursorTextFormatting.html
yAxis.setTextFormatting(“$0.0000”);

I checked my code and its the same like yours. On Android i have:

// yAxis filed with type IAxis
private IAxis yAxis;

// create
yAxis = sciChartBuilder
.newNumericAxis()
.withGrowBy(0.01d, 0.1d)
.withDrawLabels(true)
.withDrawMajorGridLines(true)
.withDrawMinorGridLines(false)
.withDrawMajorBands(false)
.withDrawMajorTicks(false)
.build();

// the set textFormatting:
yAxis.setTextFormatting(“$0.0000”);

On IOS i have:

var yAxis: SCINumericAxis?
self.yAxis = SCINumericAxis()
self.yAxis?.textFormatting = “$0.0”

But it is not working, can you tell me please why? What I’m doing wrong?

Showing 2 results

Try SciChart Today

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

Start TrialCase Studies