ComponentOne Gauges for WPF and Silverlight
About C1Gauges / Using C1RadialGauge / C1RadialGauge Decorators / C1RadialGauge Decorators Location
In This Topic
    C1RadialGauge Decorators Location
    In This Topic

    Each decorator element has a C1GaugeDecorator.Location property that determines where the elements are displayed. These properties range from zero (the center of the gauge) to one (the outer edge of the gauge). The gauge control also has a C1RadialGauge.Radius property that ranges from zero to one and affects the positioning of all decorators. The default value for the radius property is 0.8, which causes all decorators to be displayed entirely within the control.

    In the C1RadialGauge Decorators example, the C1GaugeDecorator.Location property for the C1GaugeLabel was set to 1.1. This caused the labels to appear offset towards the outer edge of the gauge. The labels are still drawn within the control because the C1RadialGauge.Radius property is set to 0.8 (the actual position of the labels in this case can be calculated as 1.1 * 0.8 = 0.88).

    The diagrams below show the effect of the Location properties applied to the C1GaugeMark and C1GaugeLabel elements on our sample gauge:

     


    C1GaugeLabel.Location = 1.1
    C1GaugeMark.Location = 1


    C1GaugeLabel.Location = 1
    C1GaugeMark.Location = 1


    C1GaugeLabel.Location = 0.6
    C1GaugeMark.Location = 1


    C1GaugeLabel.Location = 1.12
    C1GaugeMark.Location = 1.05


    C1GaugeLabel.Location = 1
    C1GaugeMark.Location = 1.3


    C1GaugeLabel.Location = 1.1
    C1GaugeMark.Location = 1.4

     

    Notice how specifying values greater than 1 for the C1GaugeDecorator.Location may cause the labels or marks to be drawn outside the body of the gauge.

    You may specify as many C1GaugeMark elements as you want. For example, you could create a clock gauge with a range from 0 to 60 minutes. In that case, you could use one C1GaugeLabel and two C1GaugeMark elements:

    You may also customize the labels and tick marks using the Template properties.