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 Javascript/Typescript
 QCSPCChart for Javascript/Typescript
 VariableSpecificationLimits
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic Next Topic  

ryanvs

USA
1 Posts

Posted - 27 Jun 2023 :  11:04:42  Show Profile  Reply with Quote
I am investigating the effort to upgrade from GWT to TS. In the GWT version, the 'chartdefEnhExamples.js' has a configuration with "VariableSpecificationLimits". This feature is used heavily in my existing project, but I don't see an example of the TS version with the feature and I can't find it in the documentation either. This is critical in order to upgrade. The VariableControlLimits feature is also used significantly, and I do see examples of that.

quinncurtis

1585 Posts

Posted - 27 Jun 2023 :  16:48:48  Show Profile  Reply with Quote
At any point in time, you can set (change) the existing specification limits using the chartData.setSpecLimits function, seen below near the bottom. Only the spec limit values going forward are affected, previous spec limit values show their original values. This is a simple modification to the VariableControlCharts.ts BuildXBarSigmaChart example.

let chartdata: QCSPCChartTS.SPCControlChartData | null = xbarsigmachart.ChartData;
.
.
.
let lowspecattrib: QCSPCChartTS.ChartAttribute = QCSPCChartTS.ChartAttribute.newChartAttribute3(QCSPCChartTS.ChartColor.GREEN, 3, QCSPCChartTS.ChartConstants.LS_DASH_8_4);
let upperspecattrib: QCSPCChartTS.ChartAttribute = QCSPCChartTS.ChartAttribute.newChartAttribute3(QCSPCChartTS.ChartColor.ORANGE, 3, QCSPCChartTS.ChartConstants.LS_DASH_8_4);

primarychart.addSpecLimit(QCSPCChartTS.SPCChartObjects.SPC_LOWER_SPEC_LIMIT, 23, "L SPEC", lowspecattrib);
primarychart.addSpecLimit(QCSPCChartTS.SPCChartObjects.SPC_UPPER_SPEC_LIMIT, 37, "H SPEC", upperspecattrib);

.
.
.


let numssampleintervals: number = 100;
let chartmean: number = 30;
let chartsigma: number = 5;



this.SimulateData(xbarsigmachart, numssampleintervals, chartmean, chartsigma);

if (chartdata) {
chartdata.setSpecLimits(15, 45);
}

this.SimulateData(xbarsigmachart, numssampleintervals, chartmean, chartsigma);
Go to Top of Page
   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