Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net
 SPC Control Chart Tools for .Net
 Sample Value String
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

maxonlibero

4 Posts

Posted - 10 Dec 2008 :  17:14:30  Show Profile  Reply with Quote
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



quinncurtis

1586 Posts

Posted - 10 Dec 2008 :  18:10:47  Show Profile  Reply with Quote
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.
Go to Top of Page

maxonlibero

4 Posts

Posted - 11 Dec 2008 :  18:44:11  Show Profile  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07