Search results

Getting started with ASP.NET Core Circular Gauge control

20 Jan 2022 / 2 minutes to read


To get start with ASP.NET Core application, need to ensure the following software to be installed on the machine.

  • Visual Studio 2017
  • DotNet Core 2.0

Setup ASP.NET Core application with Essential JS 2 for ASP.NET Core

The following steps to create ASP.NET Core Application.

Step 1: Create ASP.NET Core Web Application with default template project in Visual Studio 2017.

Alt text

Step 2: Once your project created. We need to add Syncfusion EJ2 package into your application by using Nugget Package Manager.

Open the nuGet package manager.

Alt text

Install the Syncfusion.EJ2 package to the application

Alt text

After Installation complete this will included in the project. You can refer it from the Project Assembly Reference.

We need to install NewtonSoft.JSON as dependency since it Syncfusion.EJ2 dependent to NewtonSoft.JSON package.

Step 3: Open the _ViewImports.cshtml to import Syncfusion.EJ2 package.

Copied to clipboard
@addTagHelper *, Syncfusion.EJ2

Step 4: Add client side resource through CDN or local package in the layout page _Layout.cshtml.

Copied to clipboard
@* Syncfusion Essential JS 2 Scripts *@
<script src=""></script>

Step 5: Adding Script Manager in layout page _Layout.cshtml.

Copied to clipboard

Step 6: Add the below code to your Index.cshtml view page which is present under Views/Home folder, to initialize the circulargauge.

Render Default circulargauge

This section explains how to render default circulargauge.

Copied to clipboard
public IActionResult Default()
return View();

Add the ejs-circulargauge tag like below code snippet to create the default circulargauge.

Copied to clipboard
@using Syncfusion.EJ2;

<ejs-circulargauge id="gauge">

Add Gauge Title

You can add a title using title attribute to the circulargauge to provide quick information to the user.

Copied to clipboard
@using Syncfusion.EJ2;

<ejs-circulargauge id="circular" title = 'Speed'>


You can set the range to the axis using minimum and maximum attributes for axis tag. Refer below code snippet to add the axis range to circulargauge.

Copied to clipboard
<ejs-circulargauge id="circular">
<e-circulargauge-axis startAngle="240" endAngle="120" minimum="0" maximum="120" radius="90%"></e-circulargauge-axis>