Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCSPCChart SPC for Java
 Autoscale of Y axis

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
ajaypowral Posted - 30 Aug 2016 : 09:10:49
I am rendering a chart with following data and control limits and Y axis is set to autoscale. Now with the following data my Y axis is between 0 to 0.8 for primary chart. For secondary chart it is 0.0 to 1.0 hence the data points are not rendering in center (I was expecting due to auto scale). In primary it is rendering on top side with in primary chart. And in secondary chart, it is rendering in bottom side of the secondary chart.

I have one more issue with the chart, I don't see the UCL and LCL lines even if I am setting EnableAlarmLine, EnableAlarmLineText and EnableAlarmChecking to true, I see the label on the right hand side but I don't see the lines.

PrimaryChartSetup.ControlLimits.SetLimits =[0.8174,0.7772399273,0.8575600727]

My data looks like this -
[{
" BatchCount " : 0,
" TimeStamp " : 1455914776000,
" Note " : null,
" SampleValues " : [0.902],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 524 "
}, {
" BatchCount " : 1,
" TimeStamp " : 1455918704000,
" Note " : null,
" SampleValues " : [0.847],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 523 "
}, {
" BatchCount " : 2,
" TimeStamp " : 1455919735000,
" Note " : null,
" SampleValues " : [0.843],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 522 "
}, {
" BatchCount " : 3,
" TimeStamp " : 1455922605000,
" Note " : null,
" SampleValues " : [0.83],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 521 "
}, {
" BatchCount " : 4,
" TimeStamp " : 1455924806000,
" Note " : null,
" SampleValues " : [0.823],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 520 "
}, {
" BatchCount " : 5,
" TimeStamp " : 1455926307000,
" Note " : null,
" SampleValues " : [0.82],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 519 "
}, {
" BatchCount " : 6,
" TimeStamp " : 1455929919000,
" Note " : null,
" SampleValues " : [0.838],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 518 "
}, {
" BatchCount " : 7,
" TimeStamp " : 1455936393000,
" Note " : null,
" SampleValues " : [0.809],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 517 "
}, {
" BatchCount " : 8,
" TimeStamp " : 1455936937000,
" Note " : null,
" SampleValues " : [0.814],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 516 "
}, {
" BatchCount " : 9,
" TimeStamp " : 1455939257000,
" Note " : null,
" SampleValues " : [0.825],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 515 "
}, {
" BatchCount " : 10,
" TimeStamp " : 1455940820000,
" Note " : null,
" SampleValues " : [0.82],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 514 "
}, {
" BatchCount " : 11,
" TimeStamp " : 1455942215000,
" Note " : null,
" SampleValues " : [0.78],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 513 "
}, {
" BatchCount " : 12,
" TimeStamp " : 1455948074000,
" Note " : null,
" SampleValues " : [0.795],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 512 "
}, {
" BatchCount " : 13,
" TimeStamp " : 1455949428000,
" Note " : null,
" SampleValues " : [0.796],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 511 "
}, {
" BatchCount " : 14,
" TimeStamp " : 1455952754000,
" Note " : null,
" SampleValues " : [0.791],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 510 "
}, {
" BatchCount " : 15,
" TimeStamp " : 1455954288000,
" Note " : null,
" SampleValues " : [0.784],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 509 "
}, {
" BatchCount " : 16,
" TimeStamp " : 1455957394000,
" Note " : null,
" SampleValues " : [0.797],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 508 "
}, {
" BatchCount " : 17,
" TimeStamp " : 1455959924000,
" Note " : null,
" SampleValues " : [0.819],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 507 "
}, {
" BatchCount " : 18,
" TimeStamp " : 1455961982000,
" Note " : null,
" SampleValues " : [0.8],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 506 "
}, {
" BatchCount " : 19,
" TimeStamp " : 1455965518000,
" Note " : null,
" SampleValues " : [0.815],
" VariableControlLimits " : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, null, 0.0493418243],
" BatchIDString " : " 505 "
}
]
13   L A T E S T    R E P L I E S    (Newest First)
ajaypowral Posted - 31 Aug 2016 : 17:07:59
ok, I tried it again but doesn't work for my chart definition. I have sent you html and js files on the email address you mentioned.
quinncurtis Posted - 31 Aug 2016 : 15:31:33
It works fine for us. We copied your setup script, without a SpecificationLimits block, into the TimeXBarR object of the chartdefMediumSimple.js file. We added the SpecificationLimits dynamically in the SPCMediumSimple.html page, in the processJSONScriptClick event, as seen below. The resulting chart had specification limits, and was scaled correctly. We also inserted a contentContainer div block in the HTML page, in order to use the same pushJSONChartCreateDiv as you are using.

Work with it another day, ALWAYS remembering to refresh the browser with each new test. If you still cannot resolve the problem you should create a matched pair of an HTML file, and a chart setup *.js file, which demonstrates your problem, and send those to support@quinn-curtis.com.


function processJSONScriptClick( )
{


var specLimit = {
"LowSpecificationLimit": {
"EnableAlarmLineText": false,
"EnableAlarmLine": true,
"LimitValue": 0.5
},
"HighSpecificationLimit": {
"EnableAlarmLineText": true,
"EnableAlarmLine": true,
"LimitValue": 1.0
}
}
TimeXBarR.SPCChart.PrimaryChartSetup.SpecificationLimits = specLimit;
var s = JSON.stringify(TimeXBarR,undefined,2);
<!-- pushDisplayJSONScript(s); -->
pushJSONChartCreateDiv(s, "contentContainer");

}
ajaypowral Posted - 31 Aug 2016 : 13:24:34
Sorry one correction, if I don't add specification block I don't see labels, earlier it was some caching issue it didn't go away.

So, the question remains is why the spec limit lines are not rendering correctly if I add following block -
var specLimit = {
"LowSpecificationLimit": {
"EnableAlarmLineText": true,
"EnableAlarmLine": true,
"LimitValue": 0.5
},
"HighSpecificationLimit": {
"EnableAlarmLineText": true,
"EnableAlarmLine": true,
"LimitValue": 1.0
}
}
ajaypowral Posted - 31 Aug 2016 : 13:16:06
Here is the additional JSON I add for showing spec limit - which is not showing any lines but shows overwritten labels in the right side.

var specLimit = {
"LowSpecificationLimit": {
"EnableAlarmLineText": true,
"EnableAlarmLine": true,
"LimitValue": 0.5
},
"HighSpecificationLimit": {
"EnableAlarmLineText": true,
"EnableAlarmLine": true,
"LimitValue": 1.0
}
}

if I don't add this block and if there is no specification limit block at all, I still see the labels which shouldn't appear.

So in summary, what I have now is a JSON script without specification block, and I add if I have spec limits. This is similar to what you are suggesting (having multiple JSON script).

Issues to be resolved are -
1. if I don't add spec limit block, how do I hide label (LSL / USL)?

2. if I am adding above block, why the spec limit lines don't appear and y axis scale changes
quinncurtis Posted - 31 Aug 2016 : 12:10:51
Please include what ever it is you have specified for specLimit in your code below.

Also, please explain, why can't you just have two separate JSON scripts, one with spec limits (when you know what the values should be), and one without? Then you select which one to use dynamically.

function renderChartUsingJSON() {
if(showSpecLimit)
{
chartObject2.SPCChart.PrimaryChartSetup.SpecificationLimits = specLimit ;
}
var s = JSON.stringify(chartObject2);
pushJSONChartCreateDiv(s, '__qcspc_chartdiv');

}
ajaypowral Posted - 31 Aug 2016 : 10:48:33
Hello,
I modified my chart object and removed unnecessary blocks as per requirement and kept only what is required.
I am able to control the control limit lines dynamically but specification limit lines are still not coming through.

Here is my chart definition where I don't have spec limit block in the beginning and I add it later on. This chart doesn't show spec limit lines and shows the text USL / LSL text (overwritten) adjacent to x axis line.

var chartObject2 =
{
"StaticProperties": {
"Canvas": {
"Width": 866,
"Height": 430
},
"SPCChartStrings": {
"DefaultMean": "Test Label",
"DefaultSampleValue": "Test Label",
"DefaultRange": "Test Label",
"DefaultSigma": "Test Label",
"DefaultAbsRange": "Test Label",
"DefaultCpk": "cPk",
"StatMean": "Avg.",
"StatStdDev": "Std. Dev"
}
},
"SPCChart": {
"InitChartProperties": {
"SPCChartType": "INDIVIDUAL_RANGE_CHART",
"ChartMode": "Batch",
"NumDatapointsInView": 5
},
"Scrollbar": {
"EnableScrollBar": true
},
"UseNoTable": {
"PrimaryChart": true,
"SecondaryChart": true,
"Histograms": false,
"Title": ""
},
"TableSetup": {
"EnableProcessCapabilityValues": false,
"ChartData": {
"ProcessCapabilitySetup": {
"EnableCPK": true
}
}
},
"Events": {
"EnableDataToolTip": false,
"EnableJSONDataToolTip": true,
"AlarmStateEventEnable": true,
"EnableAlarmStatusValues": false,
"AlarmTransitionEventEnable": true
},
"PrimaryChartSetup": {

"ControlLimits": {
"Target": {
"EnableAlarmLine": false,
"EnableAlarmLineText": false
},
"DefaultLimits": [false, false]

},
"PlotMeasurementValues": false
},
"SecondaryChartSetup": {
"ControlLimits": {

"Target": {
"EnableAlarmLine": false,
"EnableAlarmLineText": false
},
"DefaultLimits": [false, false]
}
},
"SampleData": {
"SampleIntervalRecords": [{
"BatchCount": 0,
"TimeStamp": 1455914776000,
"Note": "",
"SampleValues": [0.902],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "524"
}, {
"BatchCount": 1,
"TimeStamp": 1455918704000,
"Note": "",
"SampleValues": [0.847],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "523"
}, {
"BatchCount": 2,
"TimeStamp": 1455919735000,
"Note": "",
"SampleValues": [0.843],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "522"
}, {
"BatchCount": 3,
"TimeStamp": 1455922605000,
"Note": "",
"SampleValues": [0.83],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "521"
}, {
"BatchCount": 4,
"TimeStamp": 1455924806000,
"Note": "",
"SampleValues": [0.823],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "520"
}, {
"BatchCount": 5,
"TimeStamp": 1455926307000,
"Note": "",
"SampleValues": [0.82],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "519"
}, {
"BatchCount": 6,
"TimeStamp": 1455929919000,
"Note": "",
"SampleValues": [0.838],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "518"
}, {
"BatchCount": 7,
"TimeStamp": 1455936393000,
"Note": "",
"SampleValues": [0.809],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "517"
}, {
"BatchCount": 8,
"TimeStamp": 1455936937000,
"Note": "",
"SampleValues": [0.814],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "516"
}, {
"BatchCount": 9,
"TimeStamp": 1455939257000,
"Note": "",
"SampleValues": [0.825],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "515"
}, {
"BatchCount": 10,
"TimeStamp": 1455940820000,
"Note": "",
"SampleValues": [0.82],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "514"
}, {
"BatchCount": 11,
"TimeStamp": 1455942215000,
"Note": "",
"SampleValues": [0.78],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "513"
}, {
"BatchCount": 12,
"TimeStamp": 1455948074000,
"Note": "",
"SampleValues": [0.795],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "512"
}
]
},
"Methods": {
"AutoCalculateControlLimits": false,
"AutoScaleYAxes": true,
"RebuildUsingCurrentData": true
}
}
};


function renderChartUsingJSON() {
if(showSpecLimit)
{
chartObject2.SPCChart.PrimaryChartSetup.SpecificationLimits = specLimit ;
}
var s = JSON.stringify(chartObject2);
pushJSONChartCreateDiv(s, '__qcspc_chartdiv');

}

thanks.
ajaypowral Posted - 30 Aug 2016 : 18:10:37
Thanks. I forgot to mention that apart from color, I also need to show / hide limit text on the right side (using "EnableAlarmLineText" : true).

So, I think, I should use Spec and control limit block if I want to hide the control limit lines and remove it if I want to show the lines. And use DefaultAlarmColors for setting up colors.
quinncurtis Posted - 30 Aug 2016 : 17:26:31
Yes, removing the unused specification limits was the critical element.
The software is designed so that you have to know when you create the JSON script whether or not you are using the Specification Limits. So if you include them you must know what values they should be set to. So if you want to somehow specify that dynamically, you will probably need to specify the entire JSON script dynamically.

If you just want to set the default control limit and specification limit colors, you can do that in the StaticProperties |DefaultAlarmColors block. See the XBarRChart script in the chartdefExampleScripts.js file for an example (it does not use DefaultAlarmColors though). For that see the example below.

"StaticProperties": {
"Canvas": {
"Width": 800,
"Height": 550
},
"DefaultFontName": "Arial, sans-serif",
"DefaultTableFont": {
"Name": "'Comic Sans MS', cursive, sans-serif",
"Size": 12,
"Style": "Plain"
},
"SPCChartStrings": {
"TitleHeader": "Project Name:",
"DefaultMean": "Average",
"TimeValueRowHeader": "Time"
},
"DefaultAlarmColors":
{
"Target": "BLACK",
"LowAlarm": "MAGENTA",
"HighAlarm": "ORANGE",
"LowSpecLimit": "BLACK",
"HighSpecLimit": "BLACK"
}
},
ajaypowral Posted - 30 Aug 2016 : 16:39:56
Now, I did one change in my chart JSON, I removed specification limit and control limit block completely and then refresh chart, it works perfect. Y axis load correctly and control limit lines load correctly. I have auto calculate control limit to false and specifying variable control limit.

I need to add specification and control limit block so that I can specify control limit lines color and specification limit line colors dynamically. Please advise on how to set the line color and still utilize variable control limit and dynamic color configuration.
ajaypowral Posted - 30 Aug 2016 : 16:13:51
ok, thanks for correcting. My scenario is I have a basic chart definition saved in .js file and then I get modified chart properties from server, which then I assign to .js chart definition. I have now removed all the null values, but it didn't solve the problems.

Here is my updated chart definition -
{
"StaticProperties": {
"Canvas": {
"Width": 866,
"Height": 430
},
"SPCChartStrings": {
"DefaultMean": "Test Label",
"DefaultSampleValue": "Test Label",
"DefaultRange": "Test Label",
"DefaultSigma": "Test Label",
"DefaultAbsRange": "Test Label",
"DefaultCpk": "cPk",
"StatMean": "Avg.",
"StatStdDev": "Std. Dev"
}
},
"SPCChart": {
"InitChartProperties": {
"SPCChartType": "INDIVIDUAL_RANGE_CHART",
"ChartMode": "Batch",
"NumDatapointsInView": 5
},
"Scrollbar": {
"EnableScrollBar": true
},
"UseNoTable": {
"PrimaryChart": true,
"SecondaryChart": true,
"Histograms": false,
"Title": ""
},
"TableSetup": {
"EnableProcessCapabilityValues": false,
"ChartData": {
"ProcessCapabilitySetup": {
"EnableCPK": true
}
}
},
"Events": {
"EnableDataToolTip": false,
"EnableJSONDataToolTip": true,
"AlarmStateEventEnable": true,
"EnableAlarmStatusValues": false,
"AlarmTransitionEventEnable": true
},
"PrimaryChartSetup": {
"SpecificationLimits": {
"LowSpecificationLimit": {
"EnableAlarmLine": false,
"EnableAlarmChecking": false,
"EnableAlarmLineText": false,
"LineColor": "0xFFFF6FFF"

},
"HighSpecificationLimit": {
"EnableAlarmLine": false,
"EnableAlarmChecking": false,
"EnableAlarmLineText": false,
"LineColor": "0xFFFF6FFF"
}
},
"ControlLimits": {
"LCL3": {
"EnableAlarmLine": true,
"EnableAlarmChecking": true,
"EnableAlarmLineText": true,
"LineColor": "0xFFFFFF82"
},
"UCL3": {
"EnableAlarmLine": true,
"EnableAlarmChecking": true,
"EnableAlarmLineText": true,
"LineColor": "0xFFFFFF82"
},
"Target": {
"EnableAlarmLine": false,
"EnableAlarmChecking": false,
"EnableAlarmLineText": true
},
"DefaultLimits": [true, true]
},

"PlotMeasurementValues": false
},
"SecondaryChartSetup": {
"ControlLimits": {
"DefaultLimits": [false, false]
}
},
"SampleData": {
"SampleIntervalRecords": [{
"BatchCount": 0,
"TimeStamp": 1455914776000,
"Note": "",
"SampleValues": [0.902],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "524"
}, {
"BatchCount": 1,
"TimeStamp": 1455918704000,
"Note": "",
"SampleValues": [0.847],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "523"
}, {
"BatchCount": 2,
"TimeStamp": 1455919735000,
"Note": "",
"SampleValues": [0.843],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "522"
}, {
"BatchCount": 3,
"TimeStamp": 1455922605000,
"Note": "",
"SampleValues": [0.83],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "521"
}, {
"BatchCount": 4,
"TimeStamp": 1455924806000,
"Note": "",
"SampleValues": [0.823],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "520"
}, {
"BatchCount": 5,
"TimeStamp": 1455926307000,
"Note": "",
"SampleValues": [0.82],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "519"
}, {
"BatchCount": 6,
"TimeStamp": 1455929919000,
"Note": "",
"SampleValues": [0.838],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "518"
}, {
"BatchCount": 7,
"TimeStamp": 1455936393000,
"Note": "",
"SampleValues": [0.809],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "517"
}, {
"BatchCount": 8,
"TimeStamp": 1455936937000,
"Note": "",
"SampleValues": [0.814],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "516"
}, {
"BatchCount": 9,
"TimeStamp": 1455939257000,
"Note": "",
"SampleValues": [0.825],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "515"
}, {
"BatchCount": 10,
"TimeStamp": 1455940820000,
"Note": "",
"SampleValues": [0.82],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "514"
}, {
"BatchCount": 11,
"TimeStamp": 1455942215000,
"Note": "",
"SampleValues": [0.78],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "513"
}, {
"BatchCount": 12,
"TimeStamp": 1455948074000,
"Note": "",
"SampleValues": [0.795],
"VariableControlLimits": [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString": "512"
}
]
},
"Methods": {
"AutoCalculateControlLimits": false,
"AutoScaleYAxes": true,
"RebuildUsingCurrentData": true
}
}


My primary chart Y Axis is still between 0.0 to 0.88 or 0.9

secondary chart y axis looks good it is 0.0 to 0.6

I don't see any control limit lines in primary chart.

Along the same line, if I add following block in primaryChart block -
"YAxisLeft":
{
"MinValue": 0.6,
"MaxValue": 1
},

and set autoscale to false in method like the following -
"Methods": {
"AutoCalculateControlLimits": false,
"AutoScaleYAxes": false,
"RebuildUsingCurrentData": true
}

then primary chart shows correct Y scale (0.6 - 1) but secondary chart Y scale shows between 0 to 40.
quinncurtis Posted - 30 Aug 2016 : 15:03:21
First of all, your JSON script is full of the value null. You seem to use it to mean false, 0.0, an empty string "", or unassigned, depending on the context.

We do not know where you picked that up from, but it is indeterminate for use in this software. That means don't use them. They are never used in our manual or in our example code.

If you don't want to assign a value to a property, then leave it out of the JSON script completely rather than assign it to null. If a property (or array property) expects a Boolean, use true or false, not null. If you want a string to be empty, assign it "". And if you want the value to be 0, assign it to 0.0.

Our original answer to your problem still applies. You stuck in some SpecificationLimits, but did not assign any limit values to them. So they remain at their default values of 0.0. The y-axis axis auto-scaling must take into account the specification limits, and if they are left at their default values of 0.0, they will ruin the y-axis auto-scaling.

So either assign reasonable values to your spec limits, or get rid of those blocks entirely.

Also, specification limits only apply to the Primary Chart. The use in a Secondary Chart is undefined. Even though the JSON parser will accept a SpecificationLimits block in the Secondary Chart without an error, you should not add specification limits to the Secondary Chart .

You have the following block a couple of times.
"YAxisLeft" : {
"MinValue" : 0,
"MaxValue" : 0
},

This is invalid so get rid of it. If you didn't explicitly auto-scale the y-axes, these values would probably result in the program crashing.
ajaypowral Posted - 30 Aug 2016 : 14:05:44
Here is the complete definition of the chart -

{
"StaticProperties" : {
"Canvas" : {
"Width" : 866,
"Height" : 430
},
"SPCChartStrings" : {
"DefaultMean" : "Test Y Label",
"DefaultSampleValue" : "Test Y Label",
"DefaultRange" : "Test Label",
"DefaultSigma" : "Test Label",
"DefaultAbsRange" : "Test Label",
"DefaultCpk" : "cPk",
"StatMean" : "Avg.",
"StatStdDev" : "Std. Dev"
}
},
"SPCChart" : {
"InitChartProperties" : {
"SPCChartType" : "INDIVIDUAL_RANGE_CHART",
"ChartMode" : "Batch",
"NumDatapointsInView" : 5
},
"Scrollbar" : {
"EnableScrollBar" : true
},
"UseNoTable" : {
"PrimaryChart" : true,
"SecondaryChart" : true,
"Histograms" : false,
"Title" : ""
},
"TableSetup" : {
"EnableProcessCapabilityValues" : false,
"ChartData" : {
"ProcessCapabilitySetup" : {
"EnableCPK" : true
}
}
},
"Events" : {
"EnableDataToolTip" : false,
"EnableJSONDataToolTip" : true,
"AlarmStateEventEnable" : true,
"EnableAlarmStatusValues" : false,
"AlarmTransitionEventEnable" : true
},
"PrimaryChartSetup" : {
"SpecificationLimits" : {
"LowSpecificationLimit" : {
"EnableAlarmLine" : false,
"EnableAlarmChecking" : false,
"LimitValue" : null,
"EnableAlarmLineText" : true,
"LineColor" : "0xFFFF6FFF",
"DisplayString" : null
},
"HighSpecificationLimit" : {
"EnableAlarmLine" : false,
"EnableAlarmChecking" : false,
"LimitValue" : null,
"EnableAlarmLineText" : true,
"LineColor" : "0xFFFF6FFF",
"DisplayString" : null
}
},
"ControlLimits" : {
"LCL3" : {
"EnableAlarmLine" : true,
"EnableAlarmChecking" : true,
"LimitValue" : null,
"EnableAlarmLineText" : true,
"LineColor" : "0xFFFFFF82",
"DisplayString" : null
},
"UCL3" : {
"EnableAlarmLine" : true,
"EnableAlarmChecking" : true,
"LimitValue" : null,
"EnableAlarmLineText" : true,
"LineColor" : "0xFFFFFF82",
"DisplayString" : null
},
"Target" : {
"EnableAlarmLine" : false,
"EnableAlarmChecking" : false,
"LimitValue" : null,
"EnableAlarmLineText" : true,
"LineColor" : null,
"DisplayString" : null
},
"DefaultLimits" : [true, true],
"SetLimits" : [0.8174, 0.7772399273, 0.8575600727]
},
"YAxisLeft" : {
"MinValue" : 0,
"MaxValue" : 0
},
"PlotMeasurementValues" : false
},
"SecondaryChartSetup" : {
"SpecificationLimits" : {
"LowSpecificationLimit" : {
"EnableAlarmLine" : false,
"EnableAlarmChecking" : false,
"LimitValue" : null,
"EnableAlarmLineText" : true,
"LineColor" : "0xFFFF6FFF",
"DisplayString" : null
},
"HighSpecificationLimit" : {
"EnableAlarmLine" : false,
"EnableAlarmChecking" : false,
"LimitValue" : null,
"EnableAlarmLineText" : true,
"LineColor" : "0xFFFF6FFF",
"DisplayString" : null
}
},
"ControlLimits" : {
"LCL3" : {
"EnableAlarmLine" : true,
"EnableAlarmChecking" : true,
"LimitValue" : null,
"EnableAlarmLineText" : true,
"LineColor" : "0xFFFFFF82",
"DisplayString" : null
},
"UCL3" : {
"EnableAlarmLine" : true,
"EnableAlarmChecking" : true,
"LimitValue" : null,
"EnableAlarmLineText" : true,
"LineColor" : "0xFFFFFF82",
"DisplayString" : null
},
"Target" : {
"EnableAlarmLine" : false,
"EnableAlarmChecking" : false,
"LimitValue" : null,
"EnableAlarmLineText" : true,
"LineColor" : null,
"DisplayString" : null
},
"DefaultLimits" : [false, false],
"SetLimits" : [null, null, null]
}
},
"SampleData" : {
"SampleIntervalRecords" : [{
"BatchCount" : 0,
"TimeStamp" : 1455914776000,
"Note" : null,
"SampleValues" : [0.902],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "524"
}, {
"BatchCount" : 1,
"TimeStamp" : 1455918704000,
"Note" : null,
"SampleValues" : [0.847],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "523"
}, {
"BatchCount" : 2,
"TimeStamp" : 1455919735000,
"Note" : null,
"SampleValues" : [0.843],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "522"
}, {
"BatchCount" : 3,
"TimeStamp" : 1455922605000,
"Note" : null,
"SampleValues" : [0.83],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "521"
}, {
"BatchCount" : 4,
"TimeStamp" : 1455924806000,
"Note" : null,
"SampleValues" : [0.823],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "520"
}, {
"BatchCount" : 5,
"TimeStamp" : 1455926307000,
"Note" : null,
"SampleValues" : [0.82],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "519"
}, {
"BatchCount" : 6,
"TimeStamp" : 1455929919000,
"Note" : null,
"SampleValues" : [0.838],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "518"
}, {
"BatchCount" : 7,
"TimeStamp" : 1455936393000,
"Note" : null,
"SampleValues" : [0.809],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "517"
}, {
"BatchCount" : 8,
"TimeStamp" : 1455936937000,
"Note" : null,
"SampleValues" : [0.814],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "516"
}, {
"BatchCount" : 9,
"TimeStamp" : 1455939257000,
"Note" : null,
"SampleValues" : [0.825],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "515"
}, {
"BatchCount" : 10,
"TimeStamp" : 1455940820000,
"Note" : null,
"SampleValues" : [0.82],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "514"
}, {
"BatchCount" : 11,
"TimeStamp" : 1455942215000,
"Note" : null,
"SampleValues" : [0.78],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "513"
}, {
"BatchCount" : 12,
"TimeStamp" : 1455948074000,
"Note" : null,
"SampleValues" : [0.795],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "512"
}, {
"BatchCount" : 13,
"TimeStamp" : 1455949428000,
"Note" : null,
"SampleValues" : [0.796],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "511"
}, {
"BatchCount" : 14,
"TimeStamp" : 1455952754000,
"Note" : null,
"SampleValues" : [0.791],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "510"
}, {
"BatchCount" : 15,
"TimeStamp" : 1455954288000,
"Note" : null,
"SampleValues" : [0.784],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "509"
}, {
"BatchCount" : 16,
"TimeStamp" : 1455957394000,
"Note" : null,
"SampleValues" : [0.797],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "508"
}, {
"BatchCount" : 17,
"TimeStamp" : 1455959924000,
"Note" : null,
"SampleValues" : [0.819],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "507"
}, {
"BatchCount" : 18,
"TimeStamp" : 1455961982000,
"Note" : null,
"SampleValues" : [0.8],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "506"
}, {
"BatchCount" : 19,
"TimeStamp" : 1455965518000,
"Note" : null,
"SampleValues" : [0.815],
"VariableControlLimits" : [0.8174, 0.7772399273, 0.8575600727, 0.0151052632, 0, 0.0493418243],
"BatchIDString" : "505"
}
]
},
"Methods" : {
"AutoCalculateControlLimits" : false,
"AutoScaleYAxes" : true,
"RebuildUsingCurrentData" : true
}
}
}


The questions / issues which I am facing are -

1. Y axis auto scale values are not correct.
2. Control limit lines are not appearing.
3. Will it cause any problem if I repeat the variable control limit for every sample interval ever if it doesn't change?
4. Which one takes precedence - SetLimit array or variable control limits if both are set?
quinncurtis Posted - 30 Aug 2016 : 12:55:20
You will have to list out, or send us the entire JSON script, not just the data. We need to see the complete setup of the chart.

You do not need to enter in the same variable control limits for each sample interval. Enter them for one sample interval and they remain in effect until changed.

You should NOT be entering in null for any control limit value. Give it a valid value.

FYI, the auto scale function does not auto-scale to just the data, it takes into account all data (both visible and not-visible on the chart) and all of the control limits. If you fail to set a control limit, and it remains at 0.0 when it should have some other value closer to the mean of the data, the it will skew the chart by forcing 0.0 to be included in the scaled range.

Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07