The ASP.NET Core Pyramid Chart is a hierarchical structure that has data in the form of triangles divided into sections, and each section with a related dataset.
Data labels display information about data points. Add a template to display data labels with HTML elements such as images, DIV, and spans for more informative data labels. You can rotate a data label by its given angle.
Data points can be exploded on rendering and on mouse click.
Group the points in a pyramid chart based on specific conditions. The grouped slices can be split into individual points by clicking the slices.
Customize the look and feel of the pyramid chart using built-in APIs.
Easily get started with ASP.NET Core Pyramid Chart by using a few lines of CSHTML and C# code, as demonstrated below. Also explore our ASP.NET Core Pyramid Chart Example that shows how to render and configure the chart.
- <ejs-accumulationchart id="container">
- <e-accumulation-series-collection>
- <e-accumulation-series dataSource="ViewBag.dataSource" xName="xValue" yName="yValue" type="@Syncfusion.EJ2.Charts.AccumulationType.Pyramid">
- </e-accumulation-series>
- </e-accumulation-series-collection>
- </ejs-accumulationchart>
- public class HomeController : Controller
- {
- public ActionResult Index()
- {
- List<PieChartData> chartData = new List<PieChartData>
- {
-
- new PieChartData { xValue = "Chrome", yValue = 37 },
- new PieChartData { xValue = "UC Browser", yValue = 17 },
- new PieChartData { xValue = "iPhone", yValue = 19 },
- new PieChartData { xValue = "Others", yValue = 4 },
- new PieChartData { xValue = "Opera", yValue = 11 },
- new PieChartData { xValue = "Android", yValue = 12 },
- };
- ViewBag.dataSource = chartData;
- return View();
- }
- }
- public class PieChartData
- {
- public string xValue;
- public double yValue;
- }