Pre loader

Xamarin.iOS: NumericAxis not respecting the VisibleRange

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

Answered
0
0

The numeric axis in our app weirdly displays the range from -2000 until 8000, even if it has or hasn’t got data series appended to it. I tried setting the VisibleRange and VisibleRangeLimit when creating the axis, but still no results. Here’s a piece of the code:

new SCINumericAxis
{
   AxisAlignment = SCIAxisAlignment.Left,
   AxisId = "axis_id",
   TextFormatting = " 0%",
   VisibleRangeLimit = new SCIDoubleRange(-30, 100),
   VisibleRange = new SCIDoubleRange(-30, 100)
};

The Y values that we have are doubles, example:

[0]: 98.26171875
[1]: 0
[2]: NaN
[3]: 98.26171875
[4]: 0
[5]: NaN
[6]: 78.203125
[7]: NaN
[8]: 38.96484375
[9]: NaN
[10]: 98.28125
[11]: 0
[12]: NaN
[13]: 68.22265625
[14]: 0

So just by looking at the values, we should have a data range from 0 to 100, but I think somehow it messes up the conversion and ends up with ridiculously large numbers. I’m not doing any additional operations on the data, the printed data above is the data from the XyDataSeries. The Y type is Double, the YMin is 0, the YMax is 98, but still ends up drawing the values until 10000.

Version
2.2.2.854
  • You must to post comments
Best Answer
1
1

It was actually this:

VisibleRange = new SCIDoubleRange(-30, 100)

Because my axis is a percentage axis, I thought it should go from -30% until 100%, but it turns out that 100% in the SCIDoubleRangerange is just 1. So basically I’ve been multiplying 100% by 100 everytime. The fix was the following:

VisibleRange = new SCIDoubleRange(-0.3, 1.1)
  • 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