Hi,
I have created a Radial WebGauge and added 3 scales of colors Green, Yellow and Red. I can point my needle to a specific value. Now I want to draw a line as part of my Yellow scale. This small line will denote the threshold value for the Gauge.
So in the attached image, I am looking to draw the small dotted line in the Yellow scale with label "Average".
Please let me know how to do this.
Thanks.
The gauge only supports adding 'gauge primitives'. In other words there is no way to add a simple shapes like line, rectangle in arbitraty places. If you need to add a dashed line at some value on the scale, you can add a needle marker that looks like a dashed line. For exapmle, add a radial gauge needle with value = 4, set start mid and end width to 2, set the extents to represent a desired span, and set the needle's appearance to be a LightVertical Hatch, with one of the colors being transparent.
Hi Max,
Thansk a lot. I could get the line as you suggested, and also added label using BoxAnnotation.
I would suggest a radial gradient instead. Set Center and Surround colors for the gradient, then use FocusScales to set the gradient stretch.
RadialGradientBrushElement radialGradient = new RadialGradientBrushElement();radialGradient.CenterColor = Color.Yellow;radialGradient.SurroundColor = Color.Red;radialGradient.CenterPoint = new PointF(50f, 50f);radialGradient.CenterPointMeasure = Measure.Percent;radialGradient.FocusScales = new PointF(0.5f, 0.5f);
RadialGaugeRange range = new RadialGaugeRange();range.StartValue=0;range.EndValue=100;range.InnerExtentStart = 55;range.InnerExtentEnd = 55;range.OuterExtent = 80;range.BrushElement = radialGradient;(ultraGauge1.Gauges[0] as RadialGauge).Scales[0].Ranges.Add(range);
Or you can use the gauge designer:
Works perfectly. Thanks a ton!.
Thanks a lot.
Hello Max
Can you inform us, how we can get Gauge Designer?
Thank You
The gauge designer is included in the product. It's part of the gauge control's design experience. When you place the gauge on a page in Visual Studio designer, the gauge designer launches automatically. Or you can bring it up by clicking the gauge and selecting the gauge designer option. Note, that this can only be done at design time. You will not be able to open the gauge designer at run time.
Thank You for information Max