## Scatter Graph

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

• Post Options:

Posted 8 September 2017, 2:51 pm EST

<FONT size=3 face=Calibri>Hi</FONT>

<o:p><FONT size=3 face=Calibri> </FONT></o:p>

<FONT size=3 face=Calibri>I have been facing an issue with scatter graph where in the I need to set these values</FONT>

<o:p><FONT size=3 face=Calibri> </FONT></o:p>

<FONT size=3 face=Calibri>Y axis  Maximum : 1.6616 </FONT>

<FONT size=3 face=Calibri>Y axis Minimum:    1.6615</FONT>

<FONT size=3 face=Calibri>X Axis Maximum : 0.04195</FONT>

<FONT size=3 face=Calibri>X Axis Minimum :  0.04185</FONT>

<o:p><FONT size=3 face=Calibri> </FONT></o:p>

<FONT size=3 face=Calibri>And in both the cases MajorUnit : 0.00005</FONT>

<o:p><FONT size=3 face=Calibri> </FONT></o:p>

<FONT size=3 face=Calibri>But in case of y axis ,the maximum is not set properly. When I set X axis location property to <B>Value</B> and LocationCustomId to <B>1.66155</B>, to make X axis cross Y at 1.66155, it takes X Axis to the farthest point. </FONT>

<o:p><FONT size=3 face=Calibri> </FONT></o:p>

<FONT size=3 face=Calibri>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.</FONT>

<o:p><FONT size=3 face=Calibri> </FONT></o:p>

<B><FONT size=3><FONT face=Calibri>P.S. Set AutoMajor, AutoMaximum, AutoMinimum, AutoMinorUinit to False<o:p></o:p></FONT></FONT></B>

<B><FONT size=3><FONT face=Calibri>Find attached the snapshot of the same.<o:p></o:p></FONT></FONT></B>

<o:p><FONT size=3 face=Calibri> </FONT></o:p>

• Post Options:

Replied 8 September 2017, 2:51 pm EST

<SPAN style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:11pt;">Hi Deepak<o:p></o:p></SPAN>

<SPAN style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:11pt;"><o:p> </o:p></SPAN>

<SPAN style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:11pt;">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. </SPAN>

<SPAN style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:11pt;"></SPAN>

<SPAN style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:11pt;"></SPAN>

• Post Options:

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
• Post Options:

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,

• Post Options:

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.

• Post Options:

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 <span class="dlgtitle"> #99924046</span><span class="lockmsg">. 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.</span> Kindly have a look at it. Please let me know if I missed something.

Thanks,

Manpreet Kaur.

• Post Options:

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:

<blockquote>

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.

</blockquote>

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

• #### ComponentOne

Forums for all current editions of the ComponentOne .NET UI control product line, including ComponentOne Studio and ComponentOne Studio for Xamarin.

• #### ActiveReports

Forums for all versions of ActiveReports and ActiveReports Server