SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

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