Example #1
0
 private void AddDataToSeries(Steema.TeeChart.Styles.Custom3DGrid ASeries)
 {
     ASeries.Clear();
     for (int len = 0; len < BIGPADLENGTH; ++len)
     {
         for (int wid = 0; wid < BIGPADWIDTH; ++wid)
         {
             ASeries.Add(wid + 1, Convert.ToDouble(FootScanArray[len, wid]), len + 1);
         }
     }
 }
Example #2
0
 private void radioButton_Click(object sender, System.EventArgs e)
 {
     tChart1.Series.RemoveAllSeries();
     if (radioButton1.Checked)
     {
         series = new Steema.TeeChart.Styles.Contour(tChart1.Chart);
         (series as Styles.Contour).DrawingAlgorithm = Steema.TeeChart.Styles.ContourConstruction.Fast;
     }
     else if (radioButton2.Checked)
     {
         series = new Steema.TeeChart.Styles.ColorGrid(tChart1.Chart);
     }
     AddDataToSeries(series);
     InitSeries(series);
 }
        public static void SmoothGrid3D(Steema.TeeChart.Styles.Custom3DGrid Series)
        {
            double tmpX, tmpY, tmpZ;
            int    tmpNumX = Series.NumXValues;
            int    tmpNumZ = Series.NumZValues;

            Series.BeginUpdate();
            Series.IrregularGrid = true;

            for (int x = 1; x < tmpNumX; ++x)
            {
                for (int z = 1; z < tmpNumZ; ++z)
                {
                    tmpX = (Series.XValues[Series[x, z]] + Series.XValues[Series[x + 1, z]]) * 0.5;
                    tmpZ = (Series.ZValues[Series[x, z]] + Series.ZValues[Series[x, z + 1]]) * 0.5;

                    tmpY = (Series.YValues[Series[x, z]]
                            + Series.YValues[Series[x + 1, z]]
                            + Series.YValues[Series[x, z]]
                            + Series.YValues[Series[x, z + 1]]) * 0.25;

                    Series.Add(tmpX, tmpY, tmpZ);

                    Series.Add(Series.XValues[Series[x, z]],
                               (Series.YValues[Series[x, z]] + Series.YValues[Series[x, z + 1]]) * 0.5,
                               tmpZ);

                    Series.Add(tmpX,
                               (Series.YValues[Series[x, z]] + Series.YValues[Series[x + 1, z]]) * 0.5,
                               Series.ZValues[Series[x, z]]);
                }
                Series.Add((Series.XValues[Series[x, tmpNumZ]] + Series.XValues[Series[x + 1, tmpNumZ]]) * 0.5,
                           (Series.YValues[Series[x, tmpNumZ]] + Series.YValues[Series[x + 1, tmpNumZ]]) * 0.5,
                           Series.ZValues[Series[x, tmpNumZ]]);
            }

            for (int z = 1; z < tmpNumZ; ++z)
            {
                Series.Add(Series.XValues[Series[tmpNumX, z]],
                           (Series.YValues[Series[tmpNumX, z]] + Series.YValues[Series[tmpNumX, z + 1]]) * 0.5,
                           (Series.ZValues[Series[tmpNumX, z]] + Series.ZValues[Series[tmpNumX, z + 1]]) * 0.5
                           );
            }

            Series.EndUpdate();
            Series.Repaint();
        }
Example #4
0
        private void InitSeries(Steema.TeeChart.Styles.Custom3DGrid ASeries)
        {
            if (ASeries is Styles.Contour)
            {
                (ASeries as Styles.Contour).NumLevels = ColorPalette.Length;
                (ASeries as Styles.Contour).CreateAutoLevels();
                (ASeries as Styles.Contour).AutomaticLevels = false;
                for (int i = 0; i < ColorPalette.Length; i++)
                {
                    (ASeries as Styles.Contour).Levels[i].UpToValue = i + 0.5;
                    (ASeries as Styles.Contour).Levels[i].Color     = ColorPalette[i];
                }
            }
            ASeries.ColorEach     = false;
            ASeries.UsePalette    = true;
            ASeries.UseColorRange = false;
            ASeries.ClearPalette();
            for (int i = 0; i < ColorPalette.Length; i++)
            {
                ASeries.AddPalette(i + 0.5, ColorPalette[i]);
            }

            ASeries.Repaint();
        }