Home Forums WinForms controls Xceed Chart for WinForms GridSurfaceSeries Empty Points: Possible bug report

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

    Hello,
    I found this reproducible bug when testing some small modifications so the grid will use empty/null points everywhere elevation was 0, including initializing grid to be all null points.

    Code to reproduce bug described below. Exact bug error described at end of code.

    Use the standard demo code from “Series/Grid Surface/General” class GridSurfaceUC

    In private void SurfaceUC_Load, make these changes:
    —————————————-
    // Comment out these lines so we see all grid row,column numbers:
    //m_Chart.Axis(StandardAxis.PrimaryX).DimensionScale.NumberOfDataPointsBetweenLabels = 10;
    //m_Chart.Axis(StandardAxis.PrimaryX).DimensionScale.NumberOfDataPointsBetweenTicks = 10;
    //m_Chart.Axis(StandardAxis.Depth).DimensionScale.NumberOfDataPointsBetweenLabels = 10;
    //m_Chart.Axis(StandardAxis.Depth).DimensionScale.NumberOfDataPointsBetweenTicks = 10;

    //m_Surface.Data.SetGridSize(32, 32);
    m_Surface.Data.SetGridSize(7, 7);

    FillSurfaceWithNull();
    //FillData();
    MyTestFillData();
    —————————————-
    Add following two methods:

    private void FillSurfaceWithNull()
    {
    int nCountX = m_Surface.Data.GridSizeX;
    int nCountZ = m_Surface.Data.GridSizeZ;

    for (int j = 0; j < nCountZ; j++)
    for (int i = 0; i < nCountX; i++)
    m_Surface.Data.SetValue(i, j, DBNull.Value);
    }

    private void MyTestFillData()
    {
    Random x = new Random();
    int nCountX = 7; //m_Surface.Data.GridSizeX;
    int nCountZ = 7; //m_Surface.Data.GridSizeZ;
    for (int i = 0; i < nCountX; i++)
    {
    if (i ==0)
    for (int j = 0; j < 6; j++)
    m_Surface.Data.SetValue(i, j, x.Next(50,100));
    if (i ==1)
    for (int j = 0; j < 5; j++)
    m_Surface.Data.SetValue(i, j, x.Next(50, 100));
    if (i ==2)
    for (int j = 0; j < 2; j++)
    m_Surface.Data.SetValue(i, j, x.Next(50, 100));
    if (i ==3)
    for (int j = 0; j < 1; j++) // change j from 1 to 2 to see its effect on next column
    m_Surface.Data.SetValue(i, j, x.Next(50, 100));
    if (i ==4)
    for (int j = 0; j < 5; j++)
    m_Surface.Data.SetValue(i, j, x.Next(50, 100));
    if (i ==5)
    for (int j = 0; j < 5; j++)
    m_Surface.Data.SetValue(i, j, x.Next(50, 100));
    if (i ==6)
    for (int j = 0; j < 3; j++)
    m_Surface.Data.SetValue(i, j, x.Next(50, 100));
    }

    Now compile/run the demo and look at the Grid.

    Note that X Axis Columns 2 and 3 are empty: They should not be empty, having a column depth of 1 and 5 cells.

    Now change j < 1; to j < 2; in above method MyTestFillData() and then compile/run and look at grid again:
    X Axis column 2 and 3 are showing elevations in the first cell of columns (cell 2,0 and 3,0), but the columns should instead be showing elevations in a total of 2 and 5 cells respectively.

    I have found many different combinations where using DBNull.Value for elevation causes nearby cells to disappear, when they shouldn’t be. It took me a while to figure out what was wrong!

    Please confirm if this is a bug or somthing else, thanks.

    Imported from legacy forums. Posted by Keith (had 3223 views)

    User (Old forums)
    Member
    Post count: 23064

    There seems to be a bug with the component, since the surface differs if it is filled with DBNull.Value instead of 0’s.

    Unfortunately, the only workaround is to use 0’s instead of Null values.

    This has been logged in our DB. However, we cannot provide at this point a time frame as to when this will be fixed.

    Imported from legacy forums. Posted by André (had 309 views)

    User (Old forums)
    Member
    Post count: 23064

    Thank you André. Is there somewhere I can check back in future to see the status of this issue?

    Imported from legacy forums. Posted by Keith (had 295 views)

    User (Old forums)
    Member
    Post count: 23064

    You can subscribe to our newsletter (www.xceedsoft.com), or check the release notes from the newest package on the <a href=”http://www.xceedsoft.com/download/updates.aspx”>this</a&gt; page.

    Imported from legacy forums. Posted by André (had 4132 views)

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