Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Vision for NET
»
Nevron Chart for .NET
»
HeatMap problems when values pass 0
HeatMap problems when values pass 0
Post Reply
HeatMap problems when values pass 0
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Lennart Bossér
Lennart Bossér
posted 9 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 5,
Visits: 37
Hello,
There seems to be some instability which leads to strange behaviour when the values in a NHeatMapSeries has both positive and negative values.
example from the Nevron example code in NHeatMapContourUC.xaml.cs lines 113 - 121
Original code (Works)
for (int row = 0; row < GridStepY; row++, x += dIncrementX)
{
y = 10 - Math.Sqrt((x * x) + (z * z) + 2);
y += 3.0 * Math.Sin(x) * Math.Cos(z);
double value = y;
data.SetValue(row, col, value);
}
Slightly altered code (Fails). Note change in line 3 below
for (int row = 0; row < GridStepY; row++, x += dIncrementX)
{
y = 1 - Math.Sqrt((x * x) + (z * z) + 2);
y += 3.0 * Math.Sin(x) * Math.Cos(z);
double value = y;
data.SetValue(row, col, value);
}
Best regards,
Lennart
Tags
NHeatMapSeries
Reply
Like
0
Replies
Lennart Bossér
Lennart Bossér
posted 9 Years Ago
ANSWER
Post Details
Group: Forum Members
Posts: 5,
Visits: 37
Version as reported in Visual studio C# 2013
Nevron.Chart.Wpf version 17.2.14.12, Runtime version v4.0.30319.
The application is the example code supplied with the Nevron charts installation eg.
C:\Program Files (x86)\Nevron Software\Nevron .NET Vision 2016.1 for VS2013\Examples\Chart\Wpf\Nevron.Examples.Chart.Wpf.VS2013.sln
In file
NHeatMapContourUC.xaml.cs
change line
115
from
y = 10 - Math.Sqrt((x * x) + (z * z) + 2);
to
y = 1 - Math.Sqrt((x * x) + (z * z) + 2);
Then rebuild and run the application and select
Chart Gallery -> Heat Map -> Heat Map Contour
Notice the change in behaviour between unmodified and modified application. Notice that also the chart shown for selection
Chart Gallery -> Heat Map -> Heat Map
get corrrupted if you select that option afterwards (reset by selecting other chart type in between).
I have noted the exact same behaviour for my own application, both with the exact data as above from your demo with the change on line 115 and also for some of my own data sets. My conclusions so far:
If the data set has values both below and over zero this behaviour often, but not always, occurs. This might make it hard to reproduce with random data, but you have the case above where it
always
occurs.
If all points in the data set have the same sign I have not seen this error so far.
Happy hunting,
Lennart
Reply
Like
0
Nevron Support
Nevron Support
posted 9 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.3K
Hi Lennart,
Just a short note that we found/fixed the problem. It was related to double precision after the 8 decimal digit so it was kind of difficult to spot at first. Thank you for sending the code that reproduces it. We'll upload a SP fixing this later today.
Best Regards,
Nevron Support Team
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
HeatMap problems when values pass 0
Lennart Bossér
-
9 Years Ago
Hi again, I have the same problem with NHeatMapSeries for other...
Lennart Bossér
-
9 Years Ago
Hi Lennart, We were unable to reproduce the problem - we tested using...
Nevron Support
-
9 Years Ago
Version as reported in Visual studio C# 2013 Nevron.Chart.Wpf version...
Lennart Bossér
-
9 Years Ago
Hi Lennart, Just a short note that we found/fixed the problem. It was...
Nevron Support
-
9 Years Ago
Post Reply
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search