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.
- bochelie asked 10 years ago
- last edited 10 years ago
- You must login to post comments
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.
- bochelie answered 10 years ago
-
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
-
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 login to post comments
Please login first to submit.