User (Legacy) Posted May 6, 2005 Report Share Posted May 6, 2005 I would like to create a statistical study that acts similar to Analysis.Cpk. In our case we would to have both Cpu and Cpl (Process Performance Upper Index and Process Performance Lower Index). I would like these two studies to act similar other studies inwhich they both show up in the statistics legend, display a calculated value, and change value based on which series is highlighted as well as whether or not the series is in the IgnoredSeries array. -Paul Link to comment Share on other sites More sharing options...
Software FX Posted May 10, 2005 Report Share Posted May 10, 2005 You need to do two things: 1) Add a custom study as follows: studyCustom = new Study(StudyType.Distribution,0); studyCustom.Text = "Cpu"; studyCustom.Value = double.NaN; studyCustom.Decimals = 2; statistics1.Studies.Add(studyCustom); 2) Attach to the chart's Highlighted event and do: private void chart1_Highlighted(object sender, SoftwareFX.ChartFX.Base.HighlightEventArgs e) { if (studyCustom != null) { if ((e.Mode & SoftwareFX.ChartFX.Base.HighlightModes.On) != 0) studyCustom.Value = nCount++; else studyCustom.Value = double.NaN; } } Note that this is a custom study so it is your application who calculates the value. CalculateCpu must be implemented by you. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
User (Legacy) Posted September 24, 2005 Author Report Share Posted September 24, 2005 Francisco, I don't see any Highlighted event on the chart. I would like to do similar think I want to calculate the Cpk for the series and added to the legend like the control does with the sigma, mean... So when the user hightlights the series it will show the value for some reason the control is not showing the value on the legend for Cpk and the limits even when I am assigning the value to the limits in code. Thanks "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:eUoO3zaVFHA.2608@webserver3.softwarefx.com... > You need to do two things: > > 1) Add a custom study as follows: > > studyCustom = new Study(StudyType.Distribution,0); > studyCustom.Text = "Cpu"; > studyCustom.Value = double.NaN; > studyCustom.Decimals = 2; > statistics1.Studies.Add(studyCustom); > 2) Attach to the chart's Highlighted event and do: > > private void chart1_Highlighted(object sender, > SoftwareFX.ChartFX.Base.HighlightEventArgs e) { > if (studyCustom != null) { > if ((e.Mode & SoftwareFX.ChartFX.Base.HighlightModes.On) != 0) > studyCustom.Value = nCount++; > else > studyCustom.Value = double.NaN; > } > } > > Note that this is a custom study so it is your application who calculates > the value. CalculateCpu must be implemented by you. > > -- > Francisco Padron > www.chartfx.com > > Link to comment Share on other sites More sharing options...
Software FX Posted September 26, 2005 Report Share Posted September 26, 2005 The Highlighted event is only available in Windows Forms. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.