Skip to content

Commit bb6a97d

Browse files
committed
Prepared sample for EmptyPoints, Annotation, Tooltip, Legend and CenterLabel UG section
1 parent 6105e31 commit bb6a97d

File tree

198 files changed

+150666
-1
lines changed

Some content is hidden

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

198 files changed

+150666
-1
lines changed

AccumulationChart/GroupPointAnnotationSample/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
var builder = WebApplication.CreateBuilder(args);
2-
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("Ngo9BigBOggjHTQxAR8/V1NBaF5cXmZCe0x0R3xbf1x0ZFREal5WTnZfUiweQnxTdEFjXX1ccHRXQWBeUEZ2Vg==");
32

43
// Add services to the container.
54
builder.Services.AddRazorPages();
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("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LegendSamples", "LegendSamples.csproj", "{FD771A7E-1219-4EFD-8D1C-E5D26A17659A}"
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+
{FD771A7E-1219-4EFD-8D1C-E5D26A17659A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{FD771A7E-1219-4EFD-8D1C-E5D26A17659A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{FD771A7E-1219-4EFD-8D1C-E5D26A17659A}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{FD771A7E-1219-4EFD-8D1C-E5D26A17659A}.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 = {F7776217-70A4-42E2-BC8D-1ED64A5773E9}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@page
2+
@using static LegendSamples.Pages.AnimationModel
3+
@model LegendSamples.Pages.AnimationModel
4+
@{
5+
List<GroupingChartData> chartData = new List<GroupingChartData>
6+
{
7+
new GroupingChartData { xValue = "China", yValue = 26, text = "China: 26" },
8+
new GroupingChartData { xValue = "Russia", yValue = 19, text = "Russia: 19" },
9+
new GroupingChartData { xValue = "Germany", yValue = 17, text = "Germany: 17" },
10+
new GroupingChartData { xValue = "Japan", yValue = 12, text = "Japan: 12" },
11+
new GroupingChartData { xValue = "France", yValue = 10, text = "France: 10" },
12+
new GroupingChartData { xValue = "South Korea", yValue = 9, text = "South Korea: 9" },
13+
new GroupingChartData { xValue = "Great Britain", yValue = 27, text = "Great Britain: 27" },
14+
new GroupingChartData { xValue = "Italy", yValue = 8, text = "Italy: 8" },
15+
new GroupingChartData { xValue = "Australia", yValue = 8, text = "Australia: 8" },
16+
new GroupingChartData { xValue = "Netherlands", yValue = 8, text = "Netherlands: 8" },
17+
new GroupingChartData { xValue = "Hungary", yValue = 8, text = "Hungary: 8" },
18+
new GroupingChartData { xValue = "Brazil", yValue = 7, text = "Brazil: 7" },
19+
new GroupingChartData { xValue = "Spain", yValue = 7, text = "Spain: 7" },
20+
new GroupingChartData { xValue = "Kenya", yValue = 6, text = "Kenya: 6" }
21+
};
22+
}
23+
24+
<ejs-accumulationchart id="container" title="RIO Olympics Gold" enableAnimation="true" enableSmartLabels="true">
25+
<e-accumulationchart-tooltipsettings enable="true"></e-accumulationchart-tooltipsettings>
26+
<e-accumulationchart-legendsettings visible="true"></e-accumulationchart-legendsettings>
27+
<e-accumulation-series-collection>
28+
<e-accumulation-series explode="true" dataSource="chartData" xName="xValue" yName="yValue" name="RIO">
29+
<e-accumulationseries-datalabel visible="true" position="Outside">
30+
<e-connectorstyle type="Line" length="5%"></e-connectorstyle>
31+
<e-font size="14px"></e-font>
32+
</e-accumulationseries-datalabel>
33+
</e-accumulation-series>
34+
</e-accumulation-series-collection>
35+
</ejs-accumulationchart>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.AspNetCore.Mvc.RazorPages;
3+
4+
namespace LegendSamples.Pages
5+
{
6+
public class AnimationModel : PageModel
7+
{
8+
public void OnGet()
9+
{
10+
}
11+
public class GroupingChartData
12+
{
13+
public string xValue;
14+
public double yValue;
15+
public string text;
16+
}
17+
}
18+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@page
2+
@using static LegendSamples.Pages.ArrowPageModel
3+
@model LegendSamples.Pages.ArrowPageModel
4+
@{
5+
List<PieChartData> chartData = new List<PieChartData>
6+
{
7+
new PieChartData { xValue = "Chrome", yValue = 37 },
8+
new PieChartData { xValue = "UC Browser", yValue = 17 },
9+
new PieChartData { xValue = "iPhone", yValue = 19 },
10+
new PieChartData { xValue = "Others", yValue = 4 },
11+
new PieChartData { xValue = "Opera", yValue = 11 },
12+
new PieChartData { xValue = "Android", yValue = 12 },
13+
};
14+
}
15+
16+
<ejs-accumulationchart id="container" title="Mobile Browser Statistics">
17+
<e-accumulationchart-legendsettings width='260px' height='50px' enablePages="false" position='Bottom'>
18+
</e-accumulationchart-legendsettings>
19+
<e-accumulation-series-collection>
20+
<e-accumulation-series dataSource="chartData" xName="xValue" yName="yValue">
21+
</e-accumulation-series>
22+
</e-accumulation-series-collection>
23+
</ejs-accumulationchart>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.AspNetCore.Mvc.RazorPages;
3+
4+
namespace LegendSamples.Pages
5+
{
6+
public class ArrowPageModel : PageModel
7+
{
8+
public void OnGet()
9+
{
10+
}
11+
public class PieChartData
12+
{
13+
public string xValue;
14+
public double yValue;
15+
}
16+
}
17+
}
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>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.AspNetCore.Mvc.RazorPages;
3+
using System.Diagnostics;
4+
5+
namespace LegendSamples.Pages
6+
{
7+
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
8+
[IgnoreAntiforgeryToken]
9+
public class ErrorModel : PageModel
10+
{
11+
public string? RequestId { get; set; }
12+
13+
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
14+
15+
private readonly ILogger<ErrorModel> _logger;
16+
17+
public ErrorModel(ILogger<ErrorModel> logger)
18+
{
19+
_logger = logger;
20+
}
21+
22+
public void OnGet()
23+
{
24+
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
25+
}
26+
}
27+
28+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@page
2+
@using static LegendSamples.Pages.IndexModel
3+
@model IndexModel
4+
@{
5+
List<PieChartData> chartData = new List<PieChartData>
6+
{
7+
new PieChartData { xValue = "Chrome", yValue = 37 },
8+
new PieChartData { xValue = "UC Browser", yValue = 17 },
9+
new PieChartData { xValue = "iPhone", yValue = 19 },
10+
new PieChartData { xValue = "Others", yValue = 4 },
11+
new PieChartData { xValue = "Opera", yValue = 11 },
12+
new PieChartData { xValue = "Android", yValue = 12 },
13+
};
14+
}
15+
16+
<ejs-accumulationchart id="container" title="Mobile Browser Statistics">
17+
<e-accumulationchart-legendsettings visible="true">
18+
</e-accumulationchart-legendsettings>
19+
<e-accumulation-series-collection>
20+
<e-accumulation-series dataSource="chartData" xName="xValue" yName="yValue" name="Browser">
21+
</e-accumulation-series>
22+
</e-accumulation-series-collection>
23+
</ejs-accumulationchart>

0 commit comments

Comments
 (0)