Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 649 - 'Regular' irregular ColorGrids not compatible with CenteredPoints
Summary: 'Regular' irregular ColorGrids not compatible with CenteredPoints
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: TeeChart.NET 2014 4.1.2014.02060
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-19 06:59 EDT by christopher ireland
Modified: 2014-03-19 06:59 EDT (History)
0 users

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description christopher ireland 2014-03-19 06:59:27 EDT
Using the following code, we can see that 'regular' irregular ColorGrids fail to render CenteredPoints properly:

    private Steema.TeeChart.Styles.ColorGrid series1;

    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;

      series1 = new Steema.TeeChart.Styles.ColorGrid(tChart1.Chart);
      FillValues(true, false); //'regular' irregular
    }

    private void FillValues(bool irregular, bool highlyirregular)
    {
      double x, y, z;
      Random rnd = new Random();
      int count = 24;
      double zInterval = irregular ? 3 : 1;
      double xInterval = irregular ? 2 : 1;

      for (x = 0; x < count; x += xInterval)
      {
        if (irregular && highlyirregular) x *= xInterval;
        for (z = 0; z < count; z += zInterval)
        {
          if (irregular && highlyirregular) z *= zInterval;
          y = rnd.NextDouble();
          series1.Add(x, y, z);
        }
      }
      series1.IrregularGrid = irregular;
    }

    private void button1_Click(object sender, EventArgs e)
    {
      series1.CenteredPoints = !series1.CenteredPoints;
    }

    private void button2_Click(object sender, EventArgs e)
    {
      series1.Clear();
      FillValues(!series1.IrregularGrid, false);
    }