Skip to content

Commit fd6e5a0

Browse files
committed
Prepared UG DataLabel samples for AccumulationChart control
1 parent 7165de4 commit fd6e5a0

File tree

101 files changed

+75329
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+75329
-2
lines changed

AccumulationChart/AccumulationChartType/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
var builder = WebApplication.CreateBuilder(args);
22

3-
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("Mgo+DSMBMAY9C3t2UFhhQlJBfVtdX2NWfFN0QXNcdV91flBBcC0sT3RfQFljTX9WdkBgW3tfcnVQRA==");
43
// Add services to the container.
54
builder.Services.AddRazorPages();
65

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Syncfusion.EJ2.AspNet.Core" Version="25.1.40" />
11+
</ItemGroup>
12+
13+
</Project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.9.34728.123
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataLabelSamples", "DataLabelSamples.csproj", "{77FEC226-0503-4FEA-B5D1-7E9427C1D945}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{77FEC226-0503-4FEA-B5D1-7E9427C1D945}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{77FEC226-0503-4FEA-B5D1-7E9427C1D945}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{77FEC226-0503-4FEA-B5D1-7E9427C1D945}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{77FEC226-0503-4FEA-B5D1-7E9427C1D945}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {9B92EF33-7FB4-4C50-9177-F1D705A3BEA3}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@page
2+
@using static DataLabelSamples.Pages.ConnectorLineModel
3+
@model DataLabelSamples.Pages.ConnectorLineModel
4+
@{
5+
List<PieChartData> chartData = new List<PieChartData>
6+
{
7+
new PieChartData { xValue = "Chrome", yValue = 37, text = "37%", fill="#498fff"},
8+
new PieChartData { xValue = "UC Browser", yValue = 17, text = "17%", fill="#ffa060"},
9+
new PieChartData { xValue = "iPhone", yValue = 19, text = "19%", fill="#ff68b6"},
10+
new PieChartData { xValue = "Others", yValue = 4 , text = "4%", fill="#81e2a1"},
11+
};
12+
}
13+
14+
<ejs-accumulationchart id="container" title="Mobile Browser Statistics" enableSmartLabels="true">
15+
<e-accumulationchart-legendsettings visible="false">
16+
</e-accumulationchart-legendsettings>
17+
<e-accumulation-series-collection>
18+
<e-accumulation-series dataSource="chartData" xName="xValue" yName="yValue" name="Browser">
19+
<e-accumulationseries-datalabel name="text" visible="true" position="Outside">
20+
<e-connectorstyle color="#f4429e" length="50px" width="2" type="Curve" dashArray="5,3">
21+
</e-connectorstyle>
22+
</e-accumulationseries-datalabel>
23+
</e-accumulation-series>
24+
</e-accumulation-series-collection>
25+
</ejs-accumulationchart>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.AspNetCore.Mvc.RazorPages;
3+
4+
namespace DataLabelSamples.Pages
5+
{
6+
public class ConnectorLineModel : PageModel
7+
{
8+
public void OnGet()
9+
{
10+
}
11+
public class PieChartData
12+
{
13+
public string xValue;
14+
public double yValue;
15+
public string text;
16+
public string fill;
17+
}
18+
}
19+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
@page
2+
@using static DataLabelSamples.Pages.CustomizationModel
3+
@model DataLabelSamples.Pages.CustomizationModel
4+
@{
5+
List<PieChartData> chartData = new List<PieChartData>
6+
{
7+
new PieChartData { xValue = "Chrome", yValue = 37, text = "37%", fill="#498fff"},
8+
new PieChartData { xValue = "UC Browser", yValue = 17, text = "17%", fill="#ffa060"},
9+
new PieChartData { xValue = "iPhone", yValue = 19, text = "19%", fill="#ff68b6"},
10+
new PieChartData { xValue = "Others", yValue = 4 , text = "4%", fill="#81e2a1"},
11+
};
12+
}
13+
14+
<ejs-accumulationchart id="container" title="Mobile Browser Statistics" textRender="textRender">
15+
<e-accumulationchart-legendsettings visible="false">
16+
</e-accumulationchart-legendsettings>
17+
<e-accumulation-series-collection>
18+
<e-accumulation-series dataSource="chartData" xName="xValue" yName="yValue" name="Browser"
19+
pointColorMapping="fill">
20+
<e-accumulationseries-datalabel name="text" visible="true" position="Outside">
21+
</e-accumulationseries-datalabel>
22+
</e-accumulation-series>
23+
</e-accumulation-series-collection>
24+
</ejs-accumulationchart>
25+
26+
<script>
27+
var textRender = function (args) {
28+
if ((args.point.x).indexOf("iPhone") > -1) {
29+
args.color = 'red';
30+
args.border.width = 1;
31+
}
32+
};
33+
</script>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.AspNetCore.Mvc.RazorPages;
3+
4+
namespace DataLabelSamples.Pages
5+
{
6+
public class CustomizationModel : PageModel
7+
{
8+
public void OnGet()
9+
{
10+
}
11+
public class PieChartData
12+
{
13+
public string xValue;
14+
public double yValue;
15+
public string text;
16+
public string fill;
17+
}
18+
}
19+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@page
2+
@using static DataLabelSamples.Pages.DataLabelTemplateModel
3+
@model DataLabelSamples.Pages.DataLabelTemplateModel
4+
@{
5+
List<PieChartData> chartData = new List<PieChartData>
6+
{
7+
new PieChartData { xValue = "Chrome", yValue = 37, text = "37%", fill="#498fff"},
8+
new PieChartData { xValue = "UC Browser", yValue = 17, text = "17%", fill="#ffa060"},
9+
new PieChartData { xValue = "iPhone", yValue = 19, text = "19%", fill="#ff68b6"},
10+
new PieChartData { xValue = "Others", yValue = 4 , text = "4%", fill="#81e2a1"},
11+
};
12+
}
13+
14+
<script id="ChartMaterial" type="text/x-template">
15+
<div id='templateWrap' style = 'background-color:#bd18f9;border-radius: 3px; float: right;padding: 2px;line-height: 20px;text-align: center;' >
16+
<img src = 'sun_annotation.png' />
17+
<div style = 'color:white; font-family:Roboto; font-style: medium; fontp-size:14px;float: right;padding: 2px;line-height: 20px;text-align: center;padding-right:6px' > <span>${ point.y } </span></div>
18+
</div>
19+
</script>
20+
21+
<ejs-accumulationchart id="container" title="Mobile Browser Statistics" enableSmartLabels="true">
22+
<e-accumulationchart-legendsettings visible="false">
23+
</e-accumulationchart-legendsettings>
24+
<e-accumulation-series-collection>
25+
<e-accumulation-series dataSource="chartData" xName="xValue" yName="yValue" name="Browser">
26+
<e-accumulationseries-datalabel name="text" visible="true" position="Inside" template="#ChartMaterial">
27+
</e-accumulationseries-datalabel>
28+
</e-accumulation-series>
29+
</e-accumulation-series-collection>
30+
</ejs-accumulationchart>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.AspNetCore.Mvc.RazorPages;
3+
4+
namespace DataLabelSamples.Pages
5+
{
6+
public class DataLabelTemplateModel : PageModel
7+
{
8+
public void OnGet()
9+
{
10+
}
11+
public class PieChartData
12+
{
13+
public string xValue;
14+
public double yValue;
15+
public string text;
16+
public string fill;
17+
}
18+
}
19+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
@page
2+
@model ErrorModel
3+
@{
4+
ViewData["Title"] = "Error";
5+
}
6+
7+
<h1 class="text-danger">Error.</h1>
8+
<h2 class="text-danger">An error occurred while processing your request.</h2>
9+
10+
@if (Model.ShowRequestId)
11+
{
12+
<p>
13+
<strong>Request ID:</strong> <code>@Model.RequestId</code>
14+
</p>
15+
}
16+
17+
<h3>Development Mode</h3>
18+
<p>
19+
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
20+
</p>
21+
<p>
22+
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
23+
It can result in displaying sensitive information from exceptions to end users.
24+
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
25+
and restarting the app.
26+
</p>

0 commit comments

Comments
 (0)