The only way the SampleValueString shows up on the y-axis is in an Individual Range chart. Please confirm that is the SPC chart you are using.
When you want to change the string, are you starting a NEW SPC run? In that case you can just start the chart over by setting it up again, starting with setting the DefaultSampleValueString , followed by a call to InitSPCTimeVariableControlChart, and setting the other properties again. It is the InitSPCTimeVariableControlChart call that picks up on the DefaultSampleValueString. Any changes to DefaultSampleValueString after that will have no effect, until InitSPCTimeVariableControlChart is called again, resetting all of the chart values back to defaults.
Or a less obvious way is to set the value of the calculated value record (record 0 in this case) that actually stores the string.
Me.ChartData.GetCalculatedValueRecord(0).ValueDescription = "XXXX" Me.RebuildChartUsingCurrentData()
This can be done anytime after the InitSPCTimeVariableControlChart call.
|