Hi Lennart,
We were unable to reproduce the problem - we tested using the following code:
private void Form1_Load(object sender, EventArgs e)
{
// set a chart title
NLabel title = new NLabel("Heat Map Contour");
title.TextStyle.FontStyle = new NFontStyle("Times New Roman", 18, FontStyle.Italic);
title.TextStyle.FillStyle = new NColorFillStyle(Color.Gray);
NChart chart = nChartControl1.Charts[0];
chart.BoundsMode = BoundsMode.Stretch;
chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = new NLinearScaleConfigurator();
// create the heat map
NHeatMapSeries heatMap = new NHeatMapSeries();
chart.Series.Add(heatMap);
heatMap.Palette.Mode = PaletteMode.AutoMinMaxColor;
heatMap.Palette.NegativeColor = Color.Blue;
heatMap.Palette.PositiveColor = Color.Red;
heatMap.Palette.ZeroColor = Color.White;
heatMap.Palette.SmoothPalette = true;
heatMap.XValuesMode = HeatMapValuesMode.OriginAndStep;
heatMap.YValuesMode = HeatMapValuesMode.OriginAndStep;
heatMap.ContourDisplayMode = ContourDisplayMode.None;
heatMap.Legend.Mode = SeriesLegendMode.SeriesLogic;
heatMap.Legend.Format = "<zone_value>";
GenerateData(heatMap);
}
private void GenerateData(NHeatMapSeries heatMap)
{
int gridSize = 1000;
double x = 0;
double z = 0;
double dIncrementX = 1.0;
double dIncrementY = 1.0;
heatMap.Data.SetGridSize(gridSize, gridSize);
Random rand = new Random();
for (int col = 0; col < gridSize; col++, x += dIncrementX)
{
for (int row = 0; row < gridSize; row++, z += dIncrementY)
{
double y = 1 - Math.Sqrt((x * x) + (z * z) + 2);
y += 3.0 * Math.Sin(x) * Math.Cos(y);
double value = y;
if (value < 0)
{
heatMap.Data.SetValue(row, col, value);
}
else
{
heatMap.Data.SetValue(row, col, value);
}
heatMap.Data.SetValue(row, col, rand.Next(200000000) - 100000000);
}
}
nChartControl1.Refresh();
}
We also tested with dynamically changing random data but again there were no problems. What is the version of the control you're currently using? Also can you send us an app that replicates the problem?
Best Regards,
Nevron Support Team