Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes from igniteui-xplat-examples-output+PRs_2024.3.5.2 #626

Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ public class OlympicMedalsTopCountriesWithTotalsItem
{
public string Year { get; set; }
public double America { get; set; }
public double AmericaGold { get; set; }
public double China { get; set; }
public double ChinaGold { get; set; }
public double Russia { get; set; }
public double RussiaGold { get; set; }
public double Total { get; set; }
}

Expand All @@ -18,48 +21,66 @@ public OlympicMedalsTopCountriesWithTotals()
{
Year = @"1996",
America = 148,
AmericaGold = 50,
China = 110,
ChinaGold = 40,
Russia = 95,
RussiaGold = 20,
Total = 353
});
this.Add(new OlympicMedalsTopCountriesWithTotalsItem()
{
Year = @"2000",
America = 142,
AmericaGold = 40,
China = 115,
ChinaGold = 45,
Russia = 91,
RussiaGold = 40,
Total = 348
});
this.Add(new OlympicMedalsTopCountriesWithTotalsItem()
{
Year = @"2004",
America = 134,
AmericaGold = 35,
China = 121,
ChinaGold = 55,
Russia = 86,
RussiaGold = 25,
Total = 341
});
this.Add(new OlympicMedalsTopCountriesWithTotalsItem()
{
Year = @"2008",
America = 131,
AmericaGold = 20,
China = 129,
ChinaGold = 35,
Russia = 65,
RussiaGold = 35,
Total = 325
});
this.Add(new OlympicMedalsTopCountriesWithTotalsItem()
{
Year = @"2012",
America = 135,
AmericaGold = 25,
China = 115,
ChinaGold = 50,
Russia = 77,
RussiaGold = 15,
Total = 327
});
this.Add(new OlympicMedalsTopCountriesWithTotalsItem()
{
Year = @"2016",
America = 146,
AmericaGold = 45,
China = 112,
ChinaGold = 45,
Russia = 88,
RussiaGold = 30,
Total = 346
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
@using IgniteUI.Blazor.Controls

<div class="container vertical">
<div class="legend">
<IgbDataLegend
Name="Legend"
@ref="legend">
</IgbDataLegend>

</div>
<div class="container vertical fill">
<IgbDataChart
ShouldAutoExpandMarginForInitialLabels="true"
ComputedPlotAreaMarginMode="ComputedPlotAreaMarginMode.Series"
Name="chart"
@ref="chart"
HighlightedValuesDisplayMode="SeriesHighlightedValuesDisplayMode.Overlay">
<IgbCategoryXAxis
Name="xAxis"
@ref="xAxis"
DataSource="OlympicMedalsTopCountriesWithTotals"
Label="Year">
</IgbCategoryXAxis>

<IgbNumericYAxis
Name="yAxis"
@ref="yAxis">
</IgbNumericYAxis>

<IgbColumnSeries
Name="ColumnSeries1"
@ref="columnSeries1"
XAxisName="xAxis"
YAxisName="yAxis"
DataSource="OlympicMedalsTopCountriesWithTotals"
Title="America"
ValueMemberPath="America"
HighlightedValueMemberPath="AmericaGold"
HighlightedTitleSuffix="">
</IgbColumnSeries>

<IgbColumnSeries
Name="ColumnSeries2"
@ref="columnSeries2"
XAxisName="xAxis"
YAxisName="yAxis"
DataSource="OlympicMedalsTopCountriesWithTotals"
Title="China"
ValueMemberPath="China"
HighlightedValueMemberPath="ChinaGold"
HighlightedTitleSuffix="">
</IgbColumnSeries>

<IgbColumnSeries
Name="ColumnSeries3"
@ref="columnSeries3"
XAxisName="xAxis"
YAxisName="yAxis"
DataSource="OlympicMedalsTopCountriesWithTotals"
Title="Russia"
ValueMemberPath="Russia"
HighlightedValueMemberPath="RussiaGold"
HighlightedTitleSuffix="">
</IgbColumnSeries>

</IgbDataChart>

</div>
</div>

@code {

private Action BindElements { get; set; }

protected override async Task OnAfterRenderAsync(bool firstRender)
{
var legend = this.legend;
var chart = this.chart;
var xAxis = this.xAxis;
var yAxis = this.yAxis;
var columnSeries1 = this.columnSeries1;
var columnSeries2 = this.columnSeries2;
var columnSeries3 = this.columnSeries3;

this.BindElements = () => {
legend.Target = this.chart;
};
this.BindElements();

}

private IgbDataLegend legend;
private IgbDataChart chart;
private IgbCategoryXAxis xAxis;
private IgbNumericYAxis yAxis;
private IgbColumnSeries columnSeries1;
private IgbColumnSeries columnSeries2;
private IgbColumnSeries columnSeries3;

private OlympicMedalsTopCountriesWithTotals _olympicMedalsTopCountriesWithTotals = null;
public OlympicMedalsTopCountriesWithTotals OlympicMedalsTopCountriesWithTotals
{
get
{
if (_olympicMedalsTopCountriesWithTotals == null)
{
_olympicMedalsTopCountriesWithTotals = new OlympicMedalsTopCountriesWithTotals();
}
return _olympicMedalsTopCountriesWithTotals;
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RazorLangVersion>3.0</RazorLangVersion>
<AssemblyName>Infragistics.Samples</AssemblyName>
<RootNamespace>Infragistics.Samples</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702,IDE0028,BL0005,0219,CS1998</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IgniteUI.Blazor" Version="23.2.120" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
</ItemGroup>

</Project>
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 16
VisualStudioVersion = 16.0.29613.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorClientApp", "BlazorClientApp.csproj", "{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F69CC3F0-BCD1-4CE6-9F39-CBED14E7FA78}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FC52AAC8-4488-40AE-9621-75F6BA744B18}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
using System;
using System.Collections.Generic;
public class OlympicMedalsTopCountriesWithTotalsItem
{
public string Year { get; set; }
public double America { get; set; }
public double AmericaGold { get; set; }
public double China { get; set; }
public double ChinaGold { get; set; }
public double Russia { get; set; }
public double RussiaGold { get; set; }
public double Total { get; set; }
}

public class OlympicMedalsTopCountriesWithTotals
: List<OlympicMedalsTopCountriesWithTotalsItem>
{
public OlympicMedalsTopCountriesWithTotals()
{
this.Add(new OlympicMedalsTopCountriesWithTotalsItem()
{
Year = @"1996",
America = 148,
AmericaGold = 50,
China = 110,
ChinaGold = 40,
Russia = 95,
RussiaGold = 20,
Total = 353
});
this.Add(new OlympicMedalsTopCountriesWithTotalsItem()
{
Year = @"2000",
America = 142,
AmericaGold = 40,
China = 115,
ChinaGold = 45,
Russia = 91,
RussiaGold = 40,
Total = 348
});
this.Add(new OlympicMedalsTopCountriesWithTotalsItem()
{
Year = @"2004",
America = 134,
AmericaGold = 35,
China = 121,
ChinaGold = 55,
Russia = 86,
RussiaGold = 25,
Total = 341
});
this.Add(new OlympicMedalsTopCountriesWithTotalsItem()
{
Year = @"2008",
America = 131,
AmericaGold = 20,
China = 129,
ChinaGold = 35,
Russia = 65,
RussiaGold = 35,
Total = 325
});
this.Add(new OlympicMedalsTopCountriesWithTotalsItem()
{
Year = @"2012",
America = 135,
AmericaGold = 25,
China = 115,
ChinaGold = 50,
Russia = 77,
RussiaGold = 15,
Total = 327
});
this.Add(new OlympicMedalsTopCountriesWithTotalsItem()
{
Year = @"2016",
America = 146,
AmericaGold = 45,
China = 112,
ChinaGold = 45,
Russia = 88,
RussiaGold = 30,
Total = 346
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Text;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using IgniteUI.Blazor.Controls; // for registering Ignite UI modules

namespace Infragistics.Samples
{
public class Program
{
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("app");
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
// registering Ignite UI modules
builder.Services.AddIgniteUIBlazor(
typeof(IgbInputModule),
typeof(IgbLegendModule),
typeof(IgbNumberAbbreviatorModule),
typeof(IgbDataChartCoreModule),
typeof(IgbDataChartCategoryModule),
typeof(IgbDataChartInteractivityModule),
typeof(IgbDataLegendModule),
typeof(IgbDataChartAnnotationModule)
);
await builder.Build().RunAsync();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:4200",
"sslPort": 44385
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"BlazorSamples": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:4200"
}
}
}
Loading
Loading