hello.
im new to this product, and am now evaluation it.
is there a guide or some other document that explaines basics on how to:
Create a guage
connect gauge to DB
use as real time guage
same goes for charts,
i havnt been able to find anything at the documentaions.
thanks for any help
HI,
here are some useful topics to guide you how to use WebChart control
http://help.infragistics.com/NetAdvantage/ASPNET/2010.3/CLR4.0/?page=Chart_Using_Chart.html
and here is one link for the WebGauge:
http://help.infragistics.com/NetAdvantage/ASPNET/2010.3/CLR4.0/?page=WebGauge_Using_WebGauge.html
And my advise is to take a look at our samples browser at
http://samples.infragistics.com/2010.3/WebFeatureBrowser/Default.aspx
where you can navigate to both WebGauge and WebChart sections and see all the samples up and runnning, there is also "Source Code" tab, where you can see the real code that stays behind the sample.
I think that's a good start
Thanks,
hi. thanks for the help..
small q,
i set a refreshIntreval to 10 seconds.
and added this:
protected void UltraGauge1_AsyncRefresh(object sender,
Infragistics.WebUI.UltraWebGauge.
RefreshEventArgs e)
{
LinearGauge gauge = this.UltraGauge1.Gauges[0] as LinearGauge;
LinearGaugeMarker marker = gauge.Scales[0].Markers[0];
int value = Convert.ToInt32(marker.Value);
tho this dos nothing. in debug i notice that there is no event fired (the brakepoint isnt reached).
whats worng?
hi, i am trying to do somthing very simple - test the real time abilitys of the product.
i have a simple liner gauge. after using one of the presets, i went to its property (from desigen mode) and addded in events in asyncRefresh a handler.
the weird thing is that now i do see it going into the event at the server side:
protected void UltraGauge1_AsyncRefresh(object sender,Infragistics.WebUI.UltraWebGauge.RefreshEventArgs e)
marker.Value = value + 5;}
but at this code: int value = Convert.ToInt32(marker.Value);
it thrwos an expexption of Object reference not set to an instance of an object.
so.. any ideas?
Hi,
I suppose it returns null because you didn't set it nowhere in the code. if you stop it with debugger you will probably see that the marker object is defined, but marker.Value will be null. So I suggest you to try that way:
In the pageLoad add this:
if (!IsPostBack)
LinearGauge myLinearGauge = new LinearGauge();
myLinearGauge.Key =
"linear";
myLinearGauge.Orientation =
LinearOrientation.Vertical;
myLinearGauge.BrushElement =
new SolidFillBrushElement(Color.White);
myLinearGauge.BoundsMeasure =
Measure.Percent;
myLinearGauge.Bounds =
new Rectangle(60, 30, 10, 40);
myLinearGauge.Scales.Add(
new LinearGaugeScale());
myLinearGauge.Scales[0].Axis =
new NumericAxis(0.0, 100.0, 20.0);
myLinearGauge.Scales[0].StartExtent = 0.0;
myLinearGauge.Scales[0].EndExtent = 100.0;
myLinearGauge.Scales[0].InnerExtent = 0.0;
myLinearGauge.Scales[0].OuterExtent = 100.0;
myLinearGauge.Scales[0].StrokeElement.Color =
Color.Black;
myLinearGauge.Scales[0].MajorTickmarks.StrokeElement.Color =
myLinearGauge.Scales[0].MajorTickmarks.ZPosition =
LinearTickmarkZPosition.BelowMarkers;
myLinearGauge.Scales[0].MajorTickmarks.StartExtent = 0.0;
myLinearGauge.Scales[0].MajorTickmarks.EndExtent = 100.0;
LinearGaugeBarMarker barMarker = myLinearGauge.Scales[0].Markers.AddBarMarker();
barMarker.InnerExtent = 10.0;
barMarker.OuterExtent = 90.0;
barMarker.BrushElement =
new SolidFillBrushElement(Color.Red);
barMarker.Value = 72.0;
this.UltraGauge1.Gauges.Add(myLinearGauge);
this.UltraGauge1.Gauges.FromKey("linear").Visible = true;
}
Here is the EventHandler:
LinearGaugeBarMarker marker = gauge.Scales[0].Markers[0] as LinearGaugeBarMarker;
Is that you are trying?
Keep in mind that if you have more than one gauges you have to get the LinearGauge, or it will throw an exception.
hi.
i used ur code.
in your code u create ur own style at code. i want to use the editor to create the desgin.
and then in the refresh event i want to have the marker value change evry 5 secons (up/down/whatEver)
in your code i get the value back into "value". but how do i set the marker?
I missed coping the last line from the handler,
you set the value that way:
marker.Value = value + 5;
In that example, every time you click on the gauge, the value is increased by 5, you can make your own logic how often fire AsyncRefresh handler, I mean on every 5 seconds minutes etc., it's up to you.
i dont think we understand each other...
i know how to use the desinger..
the very first example i posted was from that.
the problem is that when i use a gauge made by the desinger - it generates code at the aspx page. but not in the c#.
so when i try to use the refresh event at the c# it dosnt seem to work. just as u said ur self that it retuns null cose it dosnt exist. Even tho i created the gauge with the designer.. so How can i make a gauge at the designer but still have it recognized at the c# page??
here are some useful links:
http://help.infragistics.com/NetAdvantage/ASPNET/2010.3/CLR4.0/?page=WebGauge_WebGauge_Designer.html
http://help.infragistics.com/NetAdvantage/ASPNET/2010.3/CLR4.0/?page=WebGauge_Using_the_WebGauge_Designer.html
you can use them to set the gauge using the designer
hi again, yea i frigerd that one out :)
the only thing left is How can i use the guage i created in the desinger (not having to manuly create the gauge), and then feed it values in the code behind using the refresh event?