The Graph validation code checks to see if the control style is of type
CTRL_GRAPH. The issue is the newer graph is of type CTRL_GRAPH_LS.
The code for the SPC toolkit is included, so you could update this. In
..\spc\spc.c, under ValidGraphControl(), change the following
if (allowStripChart) {
if ( ctrlStyle != CTRL_GRAPH && ctrlStyle != CTRL_STRIP_CHART
&& ctrlStyle != CTRL_GRAPH_LS && ctrlStyle != CTRL_STRIP_CHART_LS)
return FALSE;
} else if (ctrlStyle != CTRL_GRAPH &&
ctrlStyle != CTRL_GRAPH_LS)
return FALSE;
Then in SPCDrawChartWithZones()
ctrlStyle = ControlStyle(pan, graphCtrl);
switch (ctrlStyle) {
case CTRL_GRAPH:
case CTRL_GRAPH_LS:
return GraphDrawChartWithZones(pan,graphCtrl, legendCtrl, points,
pointCount, startIndex, xOffset, chartLimits, redrawLimits,
numZones);
case CTRL_STRIP_CHART:
case CTRL_STRIP_CHART_LS:
return StripDrawChartWithZones(pan, graphCtrl, legendCtrl, points,
pointCount, startIndex, chartLimits, numZones);
default:
return SPC_ERROR_NOT_GRAPH_OR_STRIP;
Under SPCGetChartPlotAttributes()
switch (ctrlStyle) {
case CTRL_GRAPH:
case CTRL_GRAPH_LS:
return GraphGetChartPlotAttributes(pan, ctrl, whichPlot,
plotStyle, pointStyle, lineStyle, color);
case CTRL_STRIP_CHART:
case CTRL_STRIP_CHART_LS:
return StripGetChartPlotAttributes(pan, ctrl, whichPlot,
plotStyle, pointStyle, lineStyle, color);
default:
return SPC_ERROR_NOT_GRAPH_OR_STRIP;
}
This should fix it.
I hope this helps
Bilal Durrani
NI