Smartly Customize the Blazor Linear Gauge to Reproduce a Step Progress Bar
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (168).NET Core  (29).NET MAUI  (147)Angular  (95)ASP.NET  (51)ASP.NET Core  (81)ASP.NET MVC  (89)Azure  (40)Blazor  (186)BoldSign  (11)DocIO  (24)Essential JS 2  (101)Essential Studio  (194)File Formats  (49)Flutter  (127)JavaScript  (214)Microsoft  (118)PDF  (77)Python  (1)React  (87)Streamlit  (1)Succinctly series  (130)Syncfusion  (753)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (46)Windows Forms  (59)WinUI  (63)WPF  (147)Xamarin  (160)XlsIO  (28)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (134)Chart  (90)Cloud  (14)Company  (445)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (61)Development  (536)Doc  (7)DockingManager  (1)eBook  (98)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (29)Extensions  (21)File Manager  (6)Gantt  (17)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (419)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (36)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (11)Scheduler  (48)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (29)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (110)UI  (290)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (26)Visual Studio Code  (17)Web  (492)What's new  (269)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Smartly Customize the Blazor Linear Gauge to Reproduce a Step Progress Bar

Smartly Customize the Blazor Linear Gauge to Reproduce a Step Progress Bar

As developers, we can effectively reconstruct a specific component by changing the appearance of our component’s sub-elements.

To demonstrate, this blog will customize the appearance of the Syncfusion Blazor Linear Gauge component to replicate a step progress bar component.

Let’s get started!

Blazor Linear Gauge: An overview

The Blazor Linear Gauge visually represents data on a horizontal or vertical scale with a pointer or multiple pointers indicating specific values. It is used to design real-time apps such as thermometers, sound boards, and battery indicators.

Its key features are: 

  • Axis: An axis is a vertical or horizontal line or scale that helps display numerical values at regular intervals.
  • Major ticks: The major ticks are line strokes, like in a ruler, that indicate the major intervals of the numeric values.
  • Minor ticks: The smaller line strokes between the major ticks are known as minor ticks.
  • Range: A range is a visual element that lets you quickly determine the data points between a start and end on the axis. Also, multiple ranges with different styles can be added.
  • Pointer: A pointer indicates the appropriate resultant value on an axis. The pointer indicator can be a circle, triangle, diamond, bar, or an image.
  • Labels: A label displays appropriate text identifying the intervals.
  • Annotation: An annotation can display anything, such as a table, an image, or HTML DOM elements, at the desired location in and around the Linear Gauge’s container. Multiple annotations can be added.

Note: For more details, refer to the Getting started with Blazor Linear Gauge documentation.

Designing a step progress bar by customizing the Blazor Linear Gauge

Let’s begin customizing the appearance of the Blazor Linear Gauge component to reproduce the following step progress bar structure.Customizing Blazor Linear Gauge to reproduce a step progress bar

The previous image clearly shows that we need a horizontal line with appropriate images for each step, circle-shaped marker pointers, and labels at regular intervals.

We’ll use the axis ranges, labels, and pointer elements of the Blazor Linear Gauge component, and we don’t need the minor and major ticks, so we must hide them.

Refer to the following code example.

[Index. razor]

@using Syncfusion.Blazor.LinearGauge;

<div align="center">
 <SfLinearGauge Orientation="Orientation.Horizontal" Width="70%">
   <LinearGaugeAnnotation AxisValue="5" ZIndex="1" X="-30" Y="-80">
     <img src="selectitem.png" style="width:50px;height:50px"><img />
   <LinearGaugeAnnotation AxisValue="10" ZIndex="1" X="-30" Y="-80">
     <img src="addtocart.png" style="width:50px;height:50px"><img />
   <LinearGaugeAnnotation AxisValue="15" ZIndex="1" X="-24" Y="-80">
     <img src="filldetails.png" style="width:50px;height:50px"><img />
   <LinearGaugeAnnotation AxisValue="20" ZIndex="1" X="-25" Y="-80">
     <img src="makepayment.png" style="width:50px;height:50px"><img />
   <LinearGaugeAnnotation AxisValue="25" ZIndex="1" X="-24" Y="-80">
     <img src="downloadebook.png" style="width:50px;height:50px"><img />
  <LinearGaugeEvents AxisLabelRendering="AxisLabelChange" />
    <LinearGaugeAxis Minimum="5" Maximum="25" OpposedPosition="true">
     <LinearGaugeLine Width="5" />
     <LinearGaugeMajorTicks Height="0" />
     <LinearGaugeMinorTicks Height="0" />
     <LinearGaugeAxisLabelStyle Offset="24">
      <LinearGaugeAxisLabelFont FontFamily="inherit" Size="16px" />
      <LinearGaugePointer PointerValue="5" Height="25" Width="25" Placement="Placement.Near" MarkerType="MarkerType.Image" ImageUrl="" />
      <LinearGaugePointer PointerValue="10" Height="25" Width="25" Placement="Placement.Near" MarkerType="MarkerType.Image" ImageUrl="" />
      <LinearGaugePointer PointerValue="15" Height="25" Width="25" Placement="Placement.Near" MarkerType="MarkerType.Image" ImageUrl="" />
      <LinearGaugePointer PointerValue="20" Height="25" Width="15" Placement="Placement.Center" Position="Position.Cross" Color="#D1D9DD" MarkerType="MarkerType.Circle" Offset="-2" />
      <LinearGaugePointer PointerValue="25" Height="25" Width="15" Placement="Placement.Center" Position="Position.Cross" Color="#D1D9DD" MarkerType="MarkerType.Circle" Offset="-2" />
      <LinearGaugeRange Start="5" End="10" StartWidth="5" EndWidth="5" Color="#1FAC8A" />
      <LinearGaugeRange Start="10" End="15" StartWidth="5" EndWidth="5" Color="#1FAC8A" />
      <LinearGaugeRange Start="15" End="20" StartWidth="5" EndWidth="5" Color="#D1D9DD" />
      <LinearGaugeRange Start="20" End="25" StartWidth="5" EndWidth="5" Color="#D1D9DD" />

@code {
    private void AxisLabelChange(AxisLabelRenderEventArgs args)
        if (args.Text == "5")
            args.Text = "Select Item";
        else if (args.Text == "10")
            args.Text = "Add To Cart";
        else if (args.Text == "15")
            args.Text = "Fill Details";
        else if (args.Text == "20")
            args.Text = "Make Payment";
        else if (args.Text == "25")
            args.Text = "Download eBook";
            args.Text = " ";

Here are the key points to take from the previous code example:

  • The Height property of the major and minor ticks is set to 0 to hide them.
  • We’ve given the intervals 5, 10, 15, 20, and 25 as numeric values in the ranges but still labeled them Select Item, Add To Cart, Fill Details, Make Payment, and Download eBook to represent what the interval means.
  • The first three intervals have an image pointer marker type, while the last two have a circle pointer marker type. To effectively place those pointers over the axis, the properties Placement, Position, and Offset are used.
  • Annotation support is used to position the images to illustrate the labels.

Refer to the following output image.

Customizing Blazor Linear Gauge to reproduce a step progress bar
Customizing Blazor Linear Gauge to reproduce a step progress bar


  • Animation isn’t possible with this customization.
  • To see dynamic updates, the data in the APIs must be updated, and then the step progress bar will be refreshed.


For more details, refer to the demos on GitHub and our web site.


Thanks for reading! In this blog, we’ve explored how to customize the Blazor Linear Gauge to create a step progress bar with ease. In this way, you can also create a simple progress bar, slider, and a few other small components. Try out them and leave your feedback in the comments section below!

If you want to try out our Blazor components, download the latest version from our License and Downloads page. If you’re not yet a Syncfusion customer, we offer a 30-day free trial so you can explore all our features.

For questions, you can also contact us through our support forumsupport portal, or feedback portal. We’re always here to help you!

Related blogs


Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed
Scroll To Top