T O P I C R E V I E W |
maxonlibero |
Posted - 10 Dec 2008 : 17:14:30 Hello I'm using your SPC Control Chart control in VB2005 and I would like to change the sample string value at run time according to the data that I'm displaying.
At the moment I can change his default value using: com.quinncurtis.spcchartnet.SPCControlChartData.DefaultSampleValueString = "maxonlibero"
And at run time I can change his value with: MySPC.PrimaryChart.YAxisTitle.SetTextString("carlo") MySPC.Refresh() where MySPC is the name of my SPC control inherit from SPCTimeVariableControlChart
But when I move the scroll bar by code with: MySPC.HScrollBar1.Value += ScrollBarStep
Even if I call another time: MySPC.PrimaryChart.YAxisTitle.SetTextString("carlo") MySPC.Refresh()
I got the default sting "maxonlibero" instead of "carlo".
Can you help me? thanks Max
|
2 L A T E S T R E P L I E S (Newest First) |
maxonlibero |
Posted - 11 Dec 2008 : 18:44:11 Thank you very much  Yes I'm using an Individual Range chart and the solution in my case is to use: Me.ChartData.GetCalculatedValueRecord(0).ValueDescription = "XXXX" since I have on the same form 4 MySPC controls. Bye Max |
quinncurtis |
Posted - 10 Dec 2008 : 18:10:47 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.
|