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?
- Alexander Kishchak asked 3 years ago
- last edited 3 years ago
- You must login to post comments
Hi Alexander,
I just tried to set TextFormatting in one of our examples from demo application with latest SciChart.Android version and everything seems to work there:
@Override
protected void initExample(SciChartSurface surface) {
final IAxis xAxis = sciChartBuilder.newNumericAxis().withGrowBy(0.1d, 0.1d).withVisibleRange(1.1, 2.7).build();
final IAxis yAxis = sciChartBuilder.newNumericAxis().withGrowBy(0.1d, 0.1d).build();
yAxis.setTextFormatting("$0.0000");
final DoubleSeries fourierSeries = DataManager.getInstance().getFourierSeries(1.0, 0.1, 5000);
final IXyDataSeries<Double, Double> dataSeries = sciChartBuilder.newXyDataSeries(Double.class, Double.class).build();
dataSeries.append(fourierSeries.xValues, fourierSeries.yValues);
final FastLineRenderableSeries rSeries = sciChartBuilder.newLineSeries().withDataSeries(dataSeries).withStrokeStyle(0xFF279B27, 1f, true).build();
UpdateSuspender.using(surface, new Runnable() {
@Override
public void run() {
Collections.addAll(surface.getXAxes(), xAxis);
Collections.addAll(surface.getYAxes(), yAxis);
Collections.addAll(surface.getRenderableSeries(), rSeries);
Collections.addAll(surface.getChartModifiers(), sciChartBuilder.newModifierGroupWithDefaultModifiers().build());
sciChartBuilder.newAnimator(rSeries).withSweepTransformation().withInterpolator(new DecelerateInterpolator()).withDuration(3000).withStartDelay(350).start();
}
});
}
Can you provide a full project which reproduces this issue so I can debug it on my PC?
Best regards,
Yura
- Yura Khariton answered 3 years ago
- last edited 3 years ago
- You must login to post comments
Please login first to submit.