Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.EJ2.AspNet.Core" Version="25.1.39" />
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions AccumulationChart/AccumulationChartType/AccumulationChartType.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34728.123
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AccumulationChartType", "AccumulationChartType.csproj", "{1B95ED4D-63FF-4C57-A18B-DC6E3645D879}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1B95ED4D-63FF-4C57-A18B-DC6E3645D879}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B95ED4D-63FF-4C57-A18B-DC6E3645D879}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B95ED4D-63FF-4C57-A18B-DC6E3645D879}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1B95ED4D-63FF-4C57-A18B-DC6E3645D879}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CF63C6EA-B4C1-4668-B09C-16CCB3DD4E90}
EndGlobalSection
EndGlobal
25 changes: 25 additions & 0 deletions AccumulationChart/AccumulationChartType/Pages/ColorPalette.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@page
@using static AccumulationChartType.Pages.ColorPaletteModel
@model AccumulationChartType.Pages.ColorPaletteModel
@{
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 },
};
var palette = new string[] { "teal", "skyblue", "green", "red"};
}

<ejs-accumulationchart id="container" enableBorderOnMouseMove="false">
<e-accumulationchart-legendsettings visible="false">
</e-accumulationchart-legendsettings>
<e-accumulation-series-collection>
<e-accumulation-series dataSource="chartData" xName="xValue" yName="yValue" name="Browser" palettes="palette">
</e-accumulation-series>
</e-accumulation-series-collection>
</ejs-accumulationchart>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace AccumulationChartType.Pages
{
public class ColorPaletteModel : PageModel
{
public void OnGet()
{
}
public class PieChartData
{
public string xValue;
public double yValue;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@page
@using static AccumulationChartType.Pages.ColorTextMappingModel
@model AccumulationChartType.Pages.ColorTextMappingModel
@{
List<PieChartData> chartData = new List<PieChartData>
{
new PieChartData { xValue = "Chrome", yValue = 37, text = "37%", fill="#498fff"},
new PieChartData { xValue = "UC Browser", yValue = 17, text = "17%", fill="#ffa060"},
new PieChartData { xValue = "iPhone", yValue = 19, text = "19%", fill="#ff68b6"},
new PieChartData { xValue = "Others", yValue = 4 , text = "4%", fill="#81e2a1"},
};
}

<ejs-accumulationchart id="container" title="Mobile Browser Statistics">
<e-accumulationchart-legendsettings visible="false">
</e-accumulationchart-legendsettings>
<e-accumulation-series-collection>
<e-accumulation-series dataSource="chartData" xName="xValue" yName="yValue" name="Browser"
pointColorMapping="fill">
<e-accumulationseries-datalabel name="text" visible="true">
</e-accumulationseries-datalabel>
</e-accumulation-series>
</e-accumulation-series-collection>
</ejs-accumulationchart>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace AccumulationChartType.Pages
{
public class ColorTextMappingModel : PageModel
{
public void OnGet()
{
}
public class PieChartData
{
public string xValue;
public double yValue;
public string text;
public string fill;
}
}
}
34 changes: 34 additions & 0 deletions AccumulationChart/AccumulationChartType/Pages/Customization.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@page
@using static AccumulationChartType.Pages.CustomizationModel
@model AccumulationChartType.Pages.CustomizationModel
@{
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 },
};
}

<ejs-accumulationchart id="container" title="Mobile Browser Statistics" pointRender="pointRender">
<e-accumulationchart-legendsettings visible="false">
</e-accumulationchart-legendsettings>
<e-accumulation-series-collection>
<e-accumulation-series dataSource="chartData" xName="xValue" yName="yValue" name="Browser">
</e-accumulation-series>
</e-accumulation-series-collection>
</ejs-accumulationchart>

<script>
var pointRender = function (args) {
if ((args.point.x).indexOf("iPhone") > -1) {
args.fill = '#f4bc42';
}
else {
args.fill = '#597cf9';
}
};
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace AccumulationChartType.Pages
{
public class CustomizationModel : PageModel
{
public void OnGet()
{
}
public class PieChartData
{
public string xValue;
public double yValue;
}
}
}
24 changes: 24 additions & 0 deletions AccumulationChart/AccumulationChartType/Pages/DoughnutChart.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@page
@using static AccumulationChartType.Pages.DoughnutChartModel
@model AccumulationChartType.Pages.DoughnutChartModel
@{
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 },
};
}

<ejs-accumulationchart id="container" title="Mobile Browser Statistics">
<e-accumulationchart-legendsettings visible="false">
</e-accumulationchart-legendsettings>
<e-accumulation-series-collection>
<e-accumulation-series dataSource="@chartData" xName="xValue" yName="yValue" name="Browser" innerRadius="40%">
</e-accumulation-series>
</e-accumulation-series-collection>
</ejs-accumulationchart>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace AccumulationChartType.Pages
{
public class DoughnutChartModel : PageModel
{
public void OnGet()
{
}
public class PieChartData
{
public string xValue;
public double yValue;
}
}
}
26 changes: 26 additions & 0 deletions AccumulationChart/AccumulationChartType/Pages/Error.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@page
@model ErrorModel
@{
ViewData["Title"] = "Error";
}

<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>

@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}

<h3>Development Mode</h3>
<p>
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
28 changes: 28 additions & 0 deletions AccumulationChart/AccumulationChartType/Pages/Error.cshtml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Diagnostics;

namespace AccumulationChartType.Pages
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
[IgnoreAntiforgeryToken]
public class ErrorModel : PageModel
{
public string? RequestId { get; set; }

public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);

private readonly ILogger<ErrorModel> _logger;

public ErrorModel(ILogger<ErrorModel> logger)
{
_logger = logger;
}

public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@page
@using static AccumulationChartType.Pages.HidePieDoughnutBorderModel
@model AccumulationChartType.Pages.HidePieDoughnutBorderModel
@{
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 },
};
}

<ejs-accumulationchart id="container" enableBorderOnMouseMove="false">
<e-accumulationchart-legendsettings visible="false">
</e-accumulationchart-legendsettings>
<e-accumulation-series-collection>
<e-accumulation-series dataSource="@chartData" xName="xValue" yName="yValue" name="Browser">
</e-accumulation-series>
</e-accumulation-series-collection>
</ejs-accumulationchart>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace AccumulationChartType.Pages
{
public class HidePieDoughnutBorderModel : PageModel
{
public void OnGet()
{
}
public class PieChartData
{
public string xValue;
public double yValue;
}
}
}
26 changes: 26 additions & 0 deletions AccumulationChart/AccumulationChartType/Pages/Index.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@page
@using static AccumulationChartType.Pages.IndexModel
@model IndexModel
@{
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 },
};

}


<ejs-accumulationchart id="container" title="Mobile Browser Statistics">
<e-accumulationchart-legendsettings visible="false">
</e-accumulationchart-legendsettings>
<e-accumulation-series-collection>
<e-accumulation-series dataSource="@chartData" xName="xValue" yName="yValue" name="Browser">
</e-accumulation-series>
</e-accumulation-series-collection>
</ejs-accumulationchart>
25 changes: 25 additions & 0 deletions AccumulationChart/AccumulationChartType/Pages/Index.cshtml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace AccumulationChartType.Pages
{
public class IndexModel : PageModel
{
private readonly ILogger<IndexModel> _logger;

public IndexModel(ILogger<IndexModel> logger)
{
_logger = logger;
}

public void OnGet()
{

}
public class PieChartData
{
public string xValue;
public double yValue;
}
}
}
Loading