Process Control Chart
Room for easy visibility for Western Electric rules which attempt to distinguish unnatural patterns from natural patterns.
For example, adding a remark at a point which two out of three consecutive points fall beyond the 2σ limit, on the same side of the centerline.
Another example would be: Five consecutive points fall on the same side of the centerline (average)
-
Jamie commented
That level of statistical analysis would be great, but seems like a lot to ask of a charting library, IMO.
There are plenty of ways to pre-process the data and output a data array that holds all of the info needed to output a good control chart (I have one example set up here: http://jsfiddle.net/DpEAA/83/ ).
Data was processed in PHP before being sent to highcharts -
Peter Heijnen commented
I'v built it with the current functionalities, so it is already possible:
[code]
dataLabels: {
enabled:true,
rotation:270,
align: 'left',
formatter: function() {
var cat = this.x;
var valuearray=new Array(9);
var s/* var s = '<b>'+ Highcharts.dateFormat('%A, %b %e, %Y', this.x) +'</b>';*/
$.each(this.series.data, function(i, point) {
/*iterate through the data to find the corresponding point*/
if(this.series.data[i].x==cat){
valuearray[8] = i > 8 ? this.series.data[i-8].y : null ;
valuearray[7] = i > 7 ? this.series.data[i-7].y : null ;
valuearray[6] = i > 6 ? this.series.data[i-6].y : null ;
valuearray[5] = i > 5 ? this.series.data[i-5].y : null ;
valuearray[4] = i > 4 ? this.series.data[i-4].y : null ;
valuearray[3] = i > 3 ? this.series.data[i-3].y : null ;
valuearray[2] = i > 2 ? this.series.data[i-2].y : null ;
valuearray[1] = i > 1 ? this.series.data[i-1].y : null ;
valuearray[0] = i > 0 ? this.series.data[i].y : null ;
}
s=shewartRules(valuearray,UCL,LCL,Target);
});
return s;
}
}
[/code]