Home Forums WinForms controls Xceed Chart for WinForms empty datapoints in mesh surface

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18839 |

    Hi,

    I’m trying to draw a mesh surface, with draw flat, zone colouring, with using empty data point when data is not available for them.
    Take an example of a “grid” of 3 by 3.
    If all 9 point have data the surface the countour map is draw perfect.
    If I remove data for the middle points in the outter lines, the surface is draw incorrectly, sometimes with nothing being draw at all.

    The basic settings I’m using:
    m_Surface[layer].FillStyle = SurfaceFillStyle.Zone;
    m_Surface[layer].FrameStyle = SurfaceFrameStyle.None;
    m_Surface[layer].FrameLine.Width = 0;
    m_Surface[layer].DrawFlat = true;
    m_Surface[layer].AutomaticPalette = false;
    m_Surface[layer].PositionMode = SurfacePositionMode.CustomValue;
    m_Surface[layer].PositionValue = layer * dIncrementY;

    To add point data:
    if (!temp.Equals(double.NaN))
    {
    m_Surface[layer].Data.SetValue(x, z, temp, x, z);
    }
    else
    {
    m_Surface[layer].Data.SetValue(x, z, DBNull.Value, x, z);
    }

    What I’m doing wrong?
    Any help is appreciated.

    Imported from legacy forums. Posted by Jose (had 2190 views)

    Xceed Support
    Member
    Post count: 5658

    By default, the EmptyDataPointsValueMode is set to Skip. You need to change it to Average (or a custom value). With more common series (like PointSeries), you can easily get to the EmptyDataPointsValueMode. With a MeshSurfaceSeries, you need to use the GetDataSeries method:

    <code>
    //After filling your chart

    DataSeriesCollection coll = m_Surface[layer].GetDataSeries( DataSeriesMask.Values, DataSeriesMask.None, true );

    foreach( DataSeries ds in coll )
    {
    ds.EmptyDataPoints.ValueMode = EmptyDataPointsValueMode.Average;
    }
    </code>

    Imported from legacy forums. Posted by CharlesB (had 3108 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.