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 1698 - depth returns Infinity in build 4.1.2016.10260
Summary: depth returns Infinity in build 4.1.2016.10260
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Chart (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- critical
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-28 02:30 EST by Sunil Ramesh
Modified: 2016-11-29 06:14 EST (History)
2 users (show)

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


Attachments
sample project (15.90 KB, application/x-zip-compressed)
2016-11-28 02:30 EST, Sunil Ramesh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sunil Ramesh 2016-11-28 02:30:53 EST
Created attachment 666 [details]
sample project

run the below code in build 4.1.2016.10260 and 4.1.2016.05120
in 4.1.2016.10260 it returns infinity where as 4.1.2016.05120 and earlier returns non-infinity values.

I am also attaching a sample project, run it in debug to see the output for the above versions.

public partial class Form1 : Form
   {
      public Form1()
      {
         InitializeComponent();
      }

      private void button1_Click(object sender, EventArgs e)
      {
         Surface s = new Surface(tChart1.Chart);

         s.Add(1, 0.021277799637864005d, 1);
         s.Add(2, 0.03886656098240001d, 2);
         s.Add(3, 0.03886156098240001d, 3);
         s.Add(4, 0.021277399637864005d, 4);
         s.Add(1, 0.03886236098240001d, 1);
         s.Add(2, 0.03886356098240001d, 2);
         s.Add(3, 0.03986356092240001d, 3);
         s.Add(4, 0.03886356098240001d, 4);
         s.Add(1, 0.03886356098240001d, 1);
         s.Add(2, 0.021277799637864005d, 2);
         s.Add(3, 0.03886356058240001d, 3);
         s.Add(4, 0.03886356048240001d, 4);
         s.Add(1, 0.03886256098240001d, 1);
         s.Add(2, 0.03886156098240001d, 2);
         s.Add(3, 0.03886316098240001d, 3);
         s.Add(4, 0.03886351098240001d, 4);

         tChart1.Series.Add(s);
      }

      private void tChart1_GetAxisLabel(object sender, GetAxisLabelEventArgs e)
      {
         if (sender.Equals(tChart1.Axes.Depth))
         {
            double dv = double.Parse(e.LabelText);
            Debug.WriteLine("depth: {0}, Infinity? {1}", e.LabelText, double.IsInfinity(dv));
         }
      }

      private void Form1_Load(object sender, EventArgs e)
      {
         tChart1.Graphics3D.SmoothingMode = SmoothingMode.HighQuality;
         tChart1.Graphics3D.BufferStyle = BufferStyle.OptimizedBuffer;

         tChart1.Aspect.ClipPoints = true;
         tChart1.Aspect.Chart3DPercent = 90;
         tChart1.Aspect.Elevation = 348;
         tChart1.Aspect.Orthogonal = false;
         tChart1.Aspect.Perspective = 62;
         tChart1.Aspect.Rotation = 329;
         tChart1.Aspect.SmoothingMode = SmoothingMode.HighQuality;
         tChart1.Aspect.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
         tChart1.Aspect.Zoom = 70;
         tChart1.Aspect.View3D = false;

         tChart1.Axes.Depth.MaximumOffset = 3;
         tChart1.Axes.Depth.MinimumOffset = 3;
         tChart1.Axes.Depth.Title.Font.Size = 7;
         tChart1.Axes.Depth.AxisPen.Width = 1;
         tChart1.Axes.Depth.Labels.Font.Size = 7;
         tChart1.Axes.Depth.Visible = true;
      }
   }

//output 4.1.2016.10260
depth: 0, Infinity? False
depth: 1, Infinity? False
depth: 0.5, Infinity? False
depth: 0, Infinity? False
depth: ∞, Infinity? True
depth: ∞, Infinity? True

//output 4.1.2016.05120
depth: 0, Infinity? False
depth: 0, Infinity? False
depth: 0, Infinity? False
depth: 0, Infinity? False
depth: 0, Infinity? False
depth: 0, Infinity? False
Comment 1 marc meumann 2016-11-29 06:14:07 EST
Problem caused by increased precision of minimim axis increment value in latest release.

Fixed in code for next release. 

=======
Workaround available in current version:

Set Axis (in this case Depth) minimum increment value:

tChart1.Axes.Depth.MinAxisIncrement = 1e-50;