Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Java
 QCSPCChart SPC for Java
 pushGetJSONOverallStatistics()
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ajaypowral

USA
21 Posts

Posted - 08 Aug 2016 :  17:48:35  Show Profile  Reply with Quote
Hi, I am using pushGetJSONOverallStatistics() method to get calculated value and show it in my custom labels in the html page.
I noticed that the output of this method has a typo error -
"StandardDevation"
Here is the output it gives me for primary chart -
"PrimaryChart": {
"Mean": 26.817474351331633,
"Minimum": 24.39048129150295,
"Maximum": 29.171742505421896,
"Range": 4.781261213918945,
"StandardDevation": 1.1398256503923172,
"Median": 26.68803790856918,
"Variance": 1.299202513292269
}

I writing following code to show the values in my custom label -
$("#__qcspc_sd_value")[0].innerHTML = jsonobj.SPCOverallStatistics.PrimaryChart.StandardDevation;

Now, my concern is if you correct this typo in future release, my code will break and will no longer work. Do you have any suggestions for this.



Ajay

quinncurtis

1534 Posts

Posted - 09 Aug 2016 :  09:48:58  Show Profile  Reply with Quote
Thanks for pointing this out. We will correct the spelling it in the underlying library, which we will update next week. If you are concerned about it, you can add a simple test to see which property name is present. This seems to be common among javascript programmers.

if (typeof StandardDevation !== 'undefined')
{
$("#__qcspc_sd_value")[0].innerHTML = jsonobj.SPCOverallStatistics.PrimaryChart.StandardDevation;
} else if (typeof StandardDeviation !== 'undefined')
{
$("#__qcspc_sd_value")[0].innerHTML = jsonobj.SPCOverallStatistics.PrimaryChart.StandardDeviation;
}
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07