Tooltip in ASP.NET MVC ProgressBar Component

3 Apr 20232 minutes to read

Tooltip

The tooltip for the progress bar is used to represent the progress value. During the initial load, it can be enabled by using the Enable property. The ShowTooltipOnHover property can show the tooltip on mouseover.

@(Html.EJS().ProgressBar("lineardeterminate")
                        .Type(Syncfusion.EJ2.ProgressBar.ProgressType.Linear).Value(90)
                        .Height("90")
                        .Animation(an => an.Enable(true).Delay(0).Duration(2000))
                        .Tooltip(tp => tp.Enable(true))
                        .Render())

Format

By default, the tooltip shows information about progress. In addition to that, show more information in the tooltip using the Format property.

@(Html.EJS().ProgressBar("lineardeterminate")
                        .Type(Syncfusion.EJ2.ProgressBar.ProgressType.Linear).Value(90)
                        .Height("90")
                        .Animation(an => an.Enable(true).Delay(0).Duration(2000))
                        .Tooltip(tp => tp.Enable(true).Format("Progress: ${value}"))
                        .Render())

Customization

The Fill and Border properties are used to customize the background color and border of the tooltip respectively. The TextStyle property in the tooltip is used to customize the font of the tooltip text.

@(Html.EJS().ProgressBar("lineardeterminate")
                        .Type(Syncfusion.EJ2.ProgressBar.ProgressType.Linear).Value(90)
                        .Height("90")
                        .Animation(an => an.Enable(true).Delay(0).Duration(2000))
                        .Tooltip(tp => tp.Enable(true).Format("Progress: ${value}").TextStyle(ts => ts.FontWeight("900").Size("15px").Color("red").FontFamily("Roboto").FontStyle("Italic")))
                        .Render())