We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to format the ScaleLabel text in RadialGauge?

 

In RadialGauge ScaleLabel value will be calculated and rendered based on MajorDifference with respect to its MinimumValue and MaximumValue. But when loading multiple digit values like thousands in RadialGauge control, it will be better to format ScaleLabel value as like in Microsoft Excel.

 

For example

 

Representing scale value as 150K is nicer than 150000.

 

You can format the ScaleLabel value in RadialGauge by using its Custom Renderer support. Below steps helps to configure the Custom Renderer class to customize the RadialGauge appearance.

 

  1. Define new Custom Renderer class inherited from IRadialGaugeRenderer Interface.
  2. Implement all necessary functions for Custom Rendering purpose in RadialGauge.
  3. Perform the required Number formatting in DrawTickMark function.
  4. Apply Custom Renderer class to RadialGauge.

 

The following code demonstrates the same.                   

 

Code Snippet: [C#]

 

 

Code Snippet: [VB]

 

 

Screenshot

Without Formatting

 

 

With Formatting

 

 

Sample

 

C#:  RadialGaugeFormatStringSample

 

VB:  RadialGaugeFormatStringSample

 

 

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework:
9118 08/10/2018 11/19/2018 WinForms RadialGauge 4
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon