Pre loader

Why yAxis.setTextFormatting("$0.0000") on Android, self.yAxis?.textFormatting = "$0.0" on IOS is not working?

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 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?

Version
3
Images
  • You must to post comments
0
0

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

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