This is a migrated thread and some comments may be shown as answers.

Linear Gauge

6 Answers 114 Views
Gauges (RadialGauge, LinearGauge, BulletGraph)
This is a migrated thread and some comments may be shown as answers.
Flavio
Top achievements
Rank 1
Flavio asked on 13 Mar 2015, 02:07 AM
Hi!
I need to calculate the IMC (body mass composition) and show the results in a chartview according to the attached model. With Linear Gauge , is it possible? How to set the legend?
Maia.

6 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 16 Mar 2015, 03:13 PM
Hi Maia,

Thank you for writing.

To set the legend you can use LinearGaugeBars. In addition you can add NeedleIndicator and bind its value to your custom calculated value.

I hope this information is useful. Let me know if you need further assistance.
 
Regards,
Dimitar
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Flavio
Top achievements
Rank 1
answered on 16 Mar 2015, 05:45 PM
Hi!
I know that to set the legend the LinearGaugeBars is necessary, but, i don´t now to set the legend with values: 0 | 18.5 | 25 | 30 | 35 | 40 | 45. Is it possible?
Tks.
Maia.
0
Dimitar
Telerik team
answered on 17 Mar 2015, 03:32 PM
Hello Maia,

Thank you for writing back.

Yes this is possible. I have attached a xml file which contains a sample gauge with the scale. The following article shows how you can use the file: Save and Load Layout. You can view how the elements are initialized by selecting them and clicking their smart tag.

I hope this information is useful. Let me know if you need further assistance.

Regards,
Dimitar
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Flavio
Top achievements
Rank 1
answered on 17 Mar 2015, 06:38 PM
Hi!
Now worked..
Tks.
Maia.
0
Sergio
Top achievements
Rank 1
answered on 02 Aug 2015, 05:38 AM

Why LinearGaugeBar1.BackColor2 = Color.FromArgb(0, 0, 0); generates runtime error?

 

Consulte o fim desta mensagem para obter detalhes sobre como invocar a depuração 
JIT (just-in-time) em vez desta caixa de diálogo.

************** Texto da excepção **************
System.ArgumentException: O rectângulo '{X=0,Y=0,Width=0,Height=15}' não pode ter uma largura ou altura igual a 0.
   em System.Drawing.Drawing2D.LinearGradientBrush..ctor(RectangleF rect, Color color1, Color color2, Single angle, Boolean isAngleScaleable)
   em System.Drawing.Drawing2D.LinearGradientBrush..ctor(RectangleF rect, Color color1, Color color2, Single angle)
   em Telerik.WinControls.UI.Gauges.LinearGaugeBrushFactory.CreateBrush(GaugeVisualElement owner, GaugeBrushType type)
   em Telerik.WinControls.UI.Gauges.LinearGaugeBar.Paint(Graphics graphics, Rectangle boundingRectangle)
   em Telerik.WinControls.UI.Gauges.LinearGaugeBar.PaintElement(IGraphics graphics, Single angle, SizeF scale)
   em Telerik.WinControls.RadElement.DoOwnPaint(IGraphics graphics, Single angle, SizeF scale)
   em Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   em Telerik.WinControls.RadItem.PaintOverride(IGraphics screenRadGraphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   em Telerik.WinControls.RadElement.PaintChild(RadElement child, IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   em Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   em Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   em Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   em Telerik.WinControls.RadItem.PaintOverride(IGraphics screenRadGraphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   em Telerik.WinControls.RadElement.PaintChild(RadElement child, IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   em Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   em Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   em Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   em Telerik.WinControls.RadItem.PaintOverride(IGraphics screenRadGraphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   em Telerik.WinControls.RadControl.OnPaint(PaintEventArgs e)
   em System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   em System.Windows.Forms.Control.WmPaint(Message& m)
   em System.Windows.Forms.Control.WndProc(Message& m)
   em System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   em Telerik.WinControls.RadControl.WndProc(Message& m)
   em System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   em System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   em System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

0
Dimitar
Telerik team
answered on 03 Aug 2015, 01:25 PM
Hi Sergio,

Thank you for writing.

I was not able to reproduce the observed exception on my end. In addition, we do not have other issues that match your description in our Feedback Portal. This is why I want to kindly ask you to provide me with the exact steps that I need to take in order to reproduce the issue on my end. Perhaps you can save the layout and send us the contents of the file.

Could you please specify the exact version of the suite that you are currently using as well?

I am looking forward to your reply.

Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Gauges (RadialGauge, LinearGauge, BulletGraph)
Asked by
Flavio
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Flavio
Top achievements
Rank 1
Sergio
Top achievements
Rank 1
Share this question
or