Pre loader

range double value

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

Hallo,

I use this line to set my YAxis range:
myYAxis.VisibleRange = RangeFactory.NewWithMinMax(myYAxis.VisibleRange, 2.22, 2.33);

However i get an error that the value expected is int32. But i want to pass a double.

  • You must to post comments
Good Answer
0
0

The exception is thrown before setting the range. Im using NumericAxis. But nevermind. I needed to use IComparable. However its strange that a double value is not accepted.

  • Andrew Burnett-Thompson
    Take a look at the RangeFactory methods in the API docs. Double is an IComparable so should work. The Range Factory requires the input VisibleRange to determine the type of range to produce. This must also be a DoubleRange. hope you get it working as expected
  • Andrew Burnett-Thompson
    Also, you can achieve the same thing with myYAxis.VisibleRange = new DoubleRange(2.22, 2.23); The RangeFactory is only really needed when making axis agnostic ranges (e.g. a ChartModifier which must work on any axis type). Hope this helps,
  • 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