Author |
Topic |
|
ryanvs
USA
1 Posts |
Posted - 27 Jun 2023 : 11:04:42
|
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
1586 Posts |
Posted - 27 Jun 2023 : 16:48:48
|
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); |
|
|
|
Topic |
|
|
|