Scatter Graph

Posted by: reenasirnani on 8 September 2017, 2:51 pm EST

  • Posted 8 September 2017, 2:51 pm EST

    Hi


     


    I have been facing an issue with scatter graph where in the I need to set these values


     


    Y axis  Maximum : 1.6616


    Y axis Minimum:    1.6615


    X Axis Maximum : 0.04195


    X Axis Minimum :  0.04185


     


    And in both the cases MajorUnit : 0.00005


     


    But in case of y axis ,the maximum is not set properly. When I set X axis location property to Value and LocationCustomId to 1.66155, to make X axis cross Y at 1.66155, it takes X Axis to the farthest point.


     


    If you try to change Y axis max and min to some other values say: 2.6616 and 2.6615 respectively, the output is proper.


     


    P.S. Set AutoMajor, AutoMaximum, AutoMinimum, AutoMinorUinit to False


    Find attached the snapshot of the same.


     


    Please guide.

  • Replied 8 September 2017, 2:51 pm EST

    Hi Deepak


     


    I need the output to be shown as per attached sheet with the same set of values as in the original post. In the attached file, the Y axis is showing three values but in the file you attached, the Y axis is showing 2 values only.


     


     



  • Replied 8 September 2017, 2:51 pm EST

    Hello,

    I have created a sample application using a chart control. I chose the settings as told by you and now I am able to design a chart similar to your attached image.

    I have attached the sample application please have a look at it.

     

    Thanks,

     


    2012/01/LabelWordChart.zip
  • Replied 8 September 2017, 2:51 pm EST

    Hi Deepak,


     My question is of scatter graph..You have sent me something related to PolarAxis Graph.

  • Replied 8 September 2017, 2:51 pm EST

    Hello,

    Making the setting exactly the same, I get a correct out put with Spread 6.0.3503.  I have replied to you over the emails with an attachment.

     

    Thanks,

     

  • Replied 8 September 2017, 2:51 pm EST

    Hello,

    I was able to replicate the issue where the Maximum is not set correctly and it seems to be a bug. I have reported it to the development team, the bug number for the same is  #99924046. It would be fixed in the next maintenance release. However, I was not able to replicate the other issue of yours as the X-Axis was placed at the correct location and not to the farthest point. I have attached a screenshot of the output that I got. Kindly have a look at it. Please let me know if I missed something.

    Hope it will help you. Please let me know if you have any queries further.

    Thanks,

    Manpreet Kaur.



  • Replied 8 September 2017, 2:51 pm EST

    Hi,

    A developer has looked at this issue and it seems to be a problem related to double precision.  Here is the reply from the developer:

    I believe this is an issue due to limitation of precision of double data type. Consider the following code...



    double min = 1.66150;


    double max = 1.66160;


    double unit = 0.00005;


    double y = min + unit + unit;


    MessageBox.Show("y=" + y.ToString("r"));


    MessageBox.Show("y<=max is " + (y <= max).ToString());



    In pure math, y = 1.66160 which equals max. However, double data type has limited precision. In double math, y = 1.6616000000000002 which is sligthly greater that max. In the code that generates the y axis tick marks and labels (e.g. CreateValuemahorTicks and CreatValueLabels), we are using a strict test in double math (e.g. i * majorUnit <= maximum) to determine whether or not tick mark is inside the min/max range. This strict test places the tick mark and label outside the min/max range and thus the tick mark and label are not painted.

    We are exploring whether it can be fixed by changing the code to do a less strict test for equality (approximate equals) for the drawing of the ticks and labels in the next release to address this issue.  I think this should be feasible, as the calculation engine already uses similar logic for testing equality of double values.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels