Hello,
When I have data that contains NaN values the IntensityGridSeries does not ignore these values when PixelRendering = false. See the screen shots with PixelRendering on and off. I would like to have PixelRendering off so that I can get the interpolation and contour lines.
I've attached a demo project and with data that shows the problem. The NaN values are in upper left corner, the areas that look like "C" and "@". FWIW these NaN areas display fine on SurfaceGridSeries3D plots.
Thanks
Greg.
NaN data in IntensityGridSeries
Moderator: Queue Moderators
NaN data in IntensityGridSeries
- Attachments
-
- LightningChartTest.zip
- (181.34 KiB) Downloaded 1233 times
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: NaN data in IntensityGridSeries
In general, don't use NaN values. LightningChart doesn't have check for them. It is up to the GPU how it handles them in specific visualization.
To make certain parts of IntensityGridSeries transparent, define auxiliary steps with transparent colors in your ValueRangePalette:
In data filling, replace your NaNs with aux step extreme value, to make a sharp cut without interpolated colors.
And by setting
, it won't cross-render the semi-transparent triangles in the cut zone.
Then the chart appears as:
Is this OK?
To make certain parts of IntensityGridSeries transparent, define auxiliary steps with transparent colors in your ValueRangePalette:
Code: Select all
private ValueRangePalette CreatePalette(Arction.LightningChartUltimate.SeriesXY.SeriesBaseXY ownerSeries, double ymin, double YRange)
{
ValueRangePalette palette = new ValueRangePalette(ownerSeries);
palette.Type = PaletteType.Gradient;
double yRange = YRange - ymin;
palette.Steps.Clear();
palette.MinValue = ymin;
palette.Steps.Add(new PaletteStep(palette, Color.Blue, ymin));
palette.Steps.Add(new PaletteStep(palette, Color.Lime, ymin + 33 * yRange / 100.0));
palette.Steps.Add(new PaletteStep(palette, Color.Yellow, ymin + 66 * yRange / 100.0));
palette.Steps.Add(new PaletteStep(palette, Color.Red, ymin + 100.0 * yRange / 100.0));
palette.Steps.Add(new PaletteStep(palette, Color.FromArgb(0, 0, 0, 0), ymin -10)); //Aux step
palette.Steps.Add(new PaletteStep(palette, Color.FromArgb(0,0,0,0), -1E9)); //Aux step
return palette;
}
Code: Select all
for (int iCol = 0; iCol < iSizeX; iCol++)
{
float intensity = (Z[iCol * nY + iRow]);
if(float.IsNaN(intensity))
intensity = -1E9f;
data[iCol, (nY - 1) - iRow].Value = intensity;
}
Code: Select all
m_intensityGrid.FullInterpolation = false;
Then the chart appears as:
Is this OK?
LightningChart Support Team, PT