Linear Gauge

7 posts, 0 answers
  1. Flavio
    Flavio avatar
    22 posts
    Member since:
    Jan 2011

    Posted 12 Mar 2015 Link to this post

    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.
  2. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 16 Mar 2015 Link to this post

    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.

     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Flavio
    Flavio avatar
    22 posts
    Member since:
    Jan 2011

    Posted 16 Mar 2015 in reply to Dimitar Link to this post

    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.
  5. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 17 Mar 2015 Link to this post

    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.

     
  6. Flavio
    Flavio avatar
    22 posts
    Member since:
    Jan 2011

    Posted 17 Mar 2015 in reply to Dimitar Link to this post

    Hi!
    Now worked..
    Tks.
    Maia.
  7. Sergio
    Sergio avatar
    3 posts
    Member since:
    Dec 2013

    Posted 02 Aug 2015 Link to this post

    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)

  8. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 03 Aug 2015 Link to this post

    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
Back to Top
UI for WinForms is Visual Studio 2017 Ready