I am using the "Fuel Gauge" preset on a gauge. What I want to do is have one needle represent the total sales on a particular date this year, and the other needle represent the total sales on the same date last year. What properties do I set in order to change the needle positions to represent the respective sales totals for this year and last year? For example what if sales on 03/12/2008 were $30,000.00 and sales on 03/12/2009 were $33,000.00?
the fuelgauge preset is made up of two radial gauges, so to set the value of both needles is like this:
((RadialGauge)this.ultraGauge1.Gauges[0]).Scales[0].Markers[0].Value = 30000;
((RadialGauge)this.ultraGauge1.Gauges[1]).Scales[0].Markers[0].Value = 33000;
can u give me example using any type gauge which the value from track bar, using vb 2008 ?
thanks b4
given this gauge and webslider...
<igGauge:UltraGauge ID="UltraGauge1" runat="server" Height="61px"> <Gauges> <igGaugeProp:LinearGauge MarginString="2, 2, 2, 2, Pixels"> <Scales> <igGaugeProp:LinearGaugeScale> <Markers> <igGaugeProp:LinearGaugeBarMarker> <BrushElements> <igGaugeProp:SolidFillBrushElement Color="Red" /> </BrushElements> </igGaugeProp:LinearGaugeBarMarker> </Markers> <BrushElements> <igGaugeProp:SolidFillBrushElement Color="White" /> </BrushElements> <Axes> <igGaugeProp:NumericAxis EndValue="100" /> </Axes> </igGaugeProp:LinearGaugeScale> </Scales> </igGaugeProp:LinearGauge> </Gauges> </igGauge:UltraGauge> <ig:WebSlider ID="WebSlider1" runat="server" onvaluechanged="WebSlider1_ValueChanged"> <AutoPostBackFlags ValueChanged="On" /> </ig:WebSlider>
here's the server side code to change the gauge value when the slider value changes
Protected Sub WebSlider1_ValueChanged(ByVal sender As Object, ByVal e As SliderValueChangedEventArgs) Dim gauge1 As LinearGauge = CType(Me.UltraGauge1.Gauges(0), LinearGauge) gauge1.Scales(0).Markers(0).Value = Me.WebSlider1.ValueAsDouble End Sub