Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1175
Setting Axis Start Value, Axis End Value and TickInterval with a Numeric Up/Down
posted
I'm trying to make a small gauge wizard that will give the user some control over the gauge. Here is the code I have, but when I change the value on the numeric up/down nothing happens. Any ideas?

RadialGauge myRadialGauge = ctrlUltraGauge.Gauges[0] as RadialGauge;

private void nudAxisStartVal_ValueChanged(object sender, EventArgs e)

{

NumericAxis axis = new NumericAxis();

axis.SetStartValue((double)nudAxisStartVal.Value);

axis.EndValue = (double)myRadialGauge.Scales[0].Axis.GetNumericEndValue();

axis.TickmarkInterval = (double)myRadialGauge.Scales[0].Axis.GetTickmarkInterval();

myRadialGauge.Scales[0].Axis = axis;

}

private void nudAxisEndVal_ValueChanged(object sender, EventArgs e)

{

NumericAxis axis = new NumericAxis();

axis.StartValue = (double)myRadialGauge.Scales[0].Axis.GetNumericStartValue();

axis.SetEndValue((double)nudAxisEndVal.Value);

axis.TickmarkInterval = (double)myRadialGauge.Scales[0].Axis.GetTickmarkInterval();

myRadialGauge.Scales[0].Axis = axis;

}

private void nudTickInterval_ValueChanged(object sender, EventArgs e)

{

NumericAxis axis = new NumericAxis();

axis.StartValue = (double)myRadialGauge.Scales[0].Axis.GetNumericStartValue();

axis.EndValue = (double)myRadialGauge.Scales[0].Axis.GetNumericEndValue();

axis.SetTickmarkInterval((double)nudTickInterval.Value);

myRadialGauge.Scales[0].Axis = axis;

}

Parents
No Data
Reply Children
No Data