Group: Forum Members
Last Active: 7 Years Ago
Posts: 5,
Visits: 37
|
Hello, How many colors can be handled with m_heatmap.Palette.AutoPaletteColors? It seems to me that about the 8 first colours are used regardless of the size of the palette. See excerpt of code below private byte[,] swecadecol = {{0, 0, 102}, {0, 0, 119}, {0, 0, 136}, {0, 0, 153}, {0, 0, 170}, {0, 0, 187}, {0, 0, 204}, {0, 0, 221}, {0, 0, 238}, {0, 38, 225}, {0, 60, 200}, {0, 137, 221}, {0, 135, 219}, {0, 181, 205}, {0, 223, 120}, {0, 255, 128}, {0, 255, 45}, {84, 255, 84}, {85, 255, 85}, {119, 255, 119}, {151, 255, 129}, {136, 255, 136}, {153, 255, 153}, {187, 255, 187}, {221, 255, 221}, {255, 255, 255}, {255, 255, 187}, {255, 255, 153}, {255, 255, 119}, {255, 255, 85}, {255, 255, 51}, {255, 255, 17}, {243, 240, 0}, {245, 243, 0}, {239, 197, 158}, {234, 179, 128}, {228, 159, 97}, {223, 140, 66}, {255, 119, 119}, {255, 85, 85}, {255, 68, 68}, {255, 34, 34}, {255, 17, 17}, {238, 0, 0}, {221, 0, 0}, {187, 0, 0}, {170, 0, 0}, {136, 0, 0}, {102, 0, 0}, {68, 0, 0}, {51, 0, 0}}; private NHeatMapSeries m_heatmap = new NHeatMapSeries(); m_heatmap.Palette.SmoothPalette = true; NArgbColorValue[] newcolors = new NArgbColorValue[51]; for (int i = 0; i < 51; i++) { newcolors[i] = new NArgbColorValue(255, swecadecol[i, 0], swecadecol[i, 1], swecadecol[i, 2]); } m_heatmap.Palette.AutoPaletteColors = newcolors;
...
I expected to see the whole range of colours from dark blue via white to dark red. But I only see dark shades of blue.
best regards, Lennart
|
Group: Forum Members
Last Active: 2 hours ago
Posts: 3,054,
Visits: 4,009
|
Hi Lennart, You also need to tell the palette to use the same number of steps as the autocolors - for example in your case: m_heatmap.Palette.PaletteSteps = 51; Let us know if you meet any problems.
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 2 hours ago
Posts: 3,054,
Visits: 4,009
|
Hi Lennart, Sometimes not all features / properties are well documented or in this case the combination of properties, because it is a very large control. We try to improve the documentation constantly though when we find discrepancies or if something is incorrect. Also the example sometimes are a better source to learn the API. If you don't find something or something is not quite clear please let us know .
Best Regards, Nevron Support Team
|