TeeChart35 .Net Project Issue

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Quant
Advanced
Posts: 142
Joined: Tue Dec 30, 2014 12:00 am

TeeChart35 .Net Project Issue

Post by Quant » Tue Apr 21, 2015 6:42 am

TeeChart Error.jpg
TeeChart Error.jpg (155.61 KiB) Viewed 7561 times
We are having some strange issue as shown in attached image. It shows left and right axis with only one value. The problem comes while we referenced TeeChart35 (.Net) project instead of TeeChart.dll in this sample application. Please let us know the solution asap.

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: TeeChart35 .Net Project Issue

Post by Christopher » Tue Apr 21, 2015 8:48 am

Quant,

Do please bear in mind our suggestions for how to post to this forum, which you can read here. Would you please be so kind as to follow point 2), that is, to create a simple example project with which we can reproduce the issue here?
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Quant
Advanced
Posts: 142
Joined: Tue Dec 30, 2014 12:00 am

Re: TeeChart35 .Net Project Issue

Post by Quant » Tue Apr 21, 2015 10:50 am

SampleApplication.zip
(12.68 KiB) Downloaded 753 times
Please find attached sample example project. Kindly note that we referenced TeeChart35 Project (Source Code) in this sample application.

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: TeeChart35 .Net Project Issue

Post by Christopher » Tue Apr 21, 2015 3:38 pm

Hello,

As you have the source code version, you can change the MinimalDifference() method of Utils.cs to the following:

Code: Select all

    public static bool MinimalDifference(double value1, double value2, int units)
    {
      long lValue1 = BitConverter.DoubleToInt64Bits(value1);
      long lValue2 = BitConverter.DoubleToInt64Bits(value2);

      // If the signs are different, return false except for +0 and -0. 
      if ((lValue1 >> 63) != (lValue2 >> 63))
      {
        if (value1 == value2)
          return true;

        return false;
      }

      long diff = Math.Abs(lValue1 - lValue2);

      if (diff <= (long)units)
        return true;

      return false;
    }
That will resolve the issue.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply