Profile Picture

Invalid view range value hangs up the application

Posted By Alexandr S. 12 Years Ago
Author
Message
Alexandr S.
Posted 12 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 23, Visits: 6
I see, but my point is that program should not become unstable (freeze up) if input data is wrong.


Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Alexandr,

The control may become numerically unstable at very large ranges - this is because not all operations for searching tick step and min / max calculations are defined (some may result in overflow leading to positive or negative infinity values). In general for the x axis the accepted values are a subset the int range when you use an ordinal scale configurator (it actually snaps those values to integer values), which have much lower resolution than double. Using a linear scale configurator for the x axis will extend that range.



Best Regards,
Nevron Support Team



Alexandr S.
Posted 12 Years Ago
View Quick Profile
Junior Member

Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)Junior Member (22 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 23, Visits: 6
Hi! I found a bug in my app, but probably you would be interested in too. I was setting wrong values to the view range and it freeze up the application. For example this simple code produces the effect:

public Form1()
{
InitializeComponent();

var nevronChart = new NCartesianChart();
nevronChart.BoundsMode = BoundsMode.Stretch;
nevronChart.ContentAlignment = ContentAlignment.BottomRight;
nevronChart.Dock = DockStyle.None;
nChartControl1.Panels.Add(nevronChart);

var axisX = nevronChart.Axis(StandardAxis.PrimaryX);
var axisY = nevronChart.Axis(StandardAxis.PrimaryY);
axisX.View = new NRangeAxisView(new NRange1DD(double.MinValue,10), true, true);
axisY.View = new NRangeAxisView(new NRange1DD(1, 10), true, true);

nChartControl1.Refresh();
}

i.e double.MinValue is a problem for nevron. Of course this value is invalid but it is better to do something else then freezing up the app.



Similar Topics


Reading This Topic