Profile Picture

Data value of infinity causes Chart to hang indefinitely

Posted By Kevin Harrison 14 Years Ago

Data value of infinity causes Chart to hang indefinitely

Author
Message
Kevin Harrison
Posted 14 Years Ago
View Quick Profile
Forum Guru

Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 52, Visits: 1

I am creating a simple 3-point line chart in C#, which displays perfectly, unless I set one of the data values to double.PositiveInfinity.  Then the chart hangs indefinitely trying to plot, using maximum CPU.  Is this a known issue?  Yes, it is stupid to deliberatly pass infinity to the chart, but it could happen in real life.

Thanks, Kevin



Milen Metodiev
Posted 14 Years Ago
View Quick Profile
Forum Member

Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)

Group: Nevron Team
Last Active: 14 Years Ago
Posts: 48, Visits: 1

Hi Kevin,

The issues with Double.NaN and Double.Infinity are fixed in our latest service pack. Please download the updated product from our website.

Best Regards,
Milen



Kevin Harrison
Posted 14 Years Ago
View Quick Profile
Forum Guru

Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 52, Visits: 1

Thanks.  The service pack has fixed the hanging issue with infinities and oddly drawn charts with double.NaN.

Double.NaN values are treated as missing points.

When there is an infinity in any data series plotted on one of the y-axes, then nothing whatsoever is plotted on the axis. So you could have one series with a single infinity data point, and ten others which are OK, but none are plotted.  I think it would be useful to have an option of "Treat infinities as missing points" so the rest of the data could be plotted.



Kevin Harrison
Posted 14 Years Ago
View Quick Profile
Forum Guru

Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 52, Visits: 1

Are there any plans to treat infinities the same as NaN?  It is rather disappointing that a single infinity in one series, prevents all series of the same type being plotted.



bob milanov
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 153, Visits: 11

Hi Kevin,

Yes we're going to add an option to treat infinity as missing values. Should be ready in the next SP of the component.

Best regards,
Bob



Kevin Harrison
Posted 14 Years Ago
View Quick Profile
Forum Guru

Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 52, Visits: 1
Great news Bob.  Any idea when it will appear?

Kevin Harrison
Posted 14 Years Ago
View Quick Profile
Forum Guru

Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 52, Visits: 1
I believe this has now been implemented but I cannot find it, please can you tell me how to treat infinties as missing points?

Nevron Support
Posted 14 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 Kevin,

Yes it present in the current download – you just have to set the TreatInfinityAsEmpty to the respective value series – for example:

NChart chart = nChartControl1.Charts[0];
NBarSeries bar = new NBarSeries();
bar.Values.Add(10);
bar.Values.Add(Double.PositiveInfinity);
bar.Values.Add(Double.NegativeInfinity);
bar.Values.Add(40);

bar.Values.TreatInfinityAsEmpty = true;

chart.Series.Add(bar);



Best Regards,
Nevron Support Team



Kevin Harrison
Posted 14 Years Ago
View Quick Profile
Forum Guru

Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 52, Visits: 1
Thanks - I wasn't looking in values.



Similar Topics


Reading This Topic