Hi!
I add range scale this way… in gaugedashboarditem…
- but, the scale is calculated over "ACTUAL VALUE"…
- but I need over TARGET VALUE…
what I need change?
thanks!
Dim range1a As New ArcScaleRange
range1a.AppearanceRange.ContentBrush = New SolidBrushObject(cor1)
If percent <> "True" Then
range1a.StartValue = valor1
range1a.EndValue = valor2
Else
range1a.StartPercent = valor1 / 100
range1a.EndPercent = valor2 / 100
End If
range1a.Name = Trim(i)
i = i + 1
gauge.Scales(0).Ranges.AddRange(New DevExpress.XtraGauges.Core.Model.IRange() {range1a})
Hi Ario,
It is unclear how the "valor1" and "valor2" variables are initialized in your example. If possible, provide a simple project (or modify the sample project from the Gauge Item - How to configure default scale and add custom ranges ticket) to illustrate your Gauge customization method. I will check for a suitable solution.
So, "valor1" and "valor2" is a my custom value…
Look print attach, today scale range is created over "maximum value" that gauge calculated automatic…
I need scales over "current value" or "goal value"…
look attach…
- where I change above in code, to say that I need PERCENT over CURRENT ou GOAL value?
for example, if valor1=50, valor2=100
range1a.StartPercent = valor1 / 100
range1a.EndPercent = valor2 / 100
percent 100% is over automatic maximum value… but I need that 100% over GOAL or CURRENT value…
thanks!
ops, attach
I found here, thanks!!
so, for winforms its fine, this way…
AddHandler dash.DashboardItemControlCreated, AddressOf dash_created
UpdateGauge(…
For Each Gauge As CircularGauge In GaugeControl.Gauges
Gauge.BeginUpdate()
Dim atual As Double = 0
Dim meta As Double = 0
Dim max As Double = 0
If Gauge.Markers.Count > 0 Then meta = Gauge.Markers(0).Value
If Gauge.Needles.Count > 0 Then atual = Gauge.Needles(0).Value
If Gauge.Scales.Count > 0 Then max = Gauge.Scales(0).MaxValue
But, for webforms, "aspxpivotgridview"… how I cast DashboardItem to GAUGECONTROL??
not exist e.gaugecontrol…
AddHandler dash1.DashboardLoaded, AddressOf dash_loaded
If InStr(LCase(e.Dashboard.Items(l).ComponentName), "gauge") > 0 Then
Dim gauge As GaugeControl = TryCast(e.Dashboard.Items(l), GaugeControl)
I say "aspxdashboardviewer" !!!
not " "aspxpivotgridview""
thanks!!
If solution is in aspx javascript…
I already have this…
for (var i = 0; i < gauges.length; i++) {
var roundValue = (gauges[i].option("scale.endValue"));
How I get this 3 informations… in this case:
If Gauge.Markers.Count > 0 Then meta = Gauge.Markers(0).Value
If Gauge.Needles.Count > 0 Then atual = Gauge.Needles(0).Value
If Gauge.Scales.Count > 0 Then max = Gauge.Scales(0).MaxValue
Hi Ario,
From what I gather, you have completed the GaugeControl range initialization routine in a WinForms application.
As for the Gauge layout customization in a Web application, use the client-side API to accomplish this task (see a similar approach described in the Web dashboard - change needle color or show different colored ranges in gauge ticket). In your example, the "roundValue" variable is initialized using the actual scale endValue property value.
Unlike the GaugeControl for WinForms, Circular Gauge Indicator elements (markers, needles) are customized using the valueIndicator option. If you need further assistance, let me know.