-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding changes from build igniteui-xplat-examples-output+PRs_2025.1.31.2
- Loading branch information
tfsbuild
committed
Jan 31, 2025
1 parent
c0a9f4d
commit 04c3b4b
Showing
13 changed files
with
438 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
samples/charts/dashboard-tile/gauge-dashboard/DashboardGaugeDataSource.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
public class DashboardGaugeDataSourceItem | ||
{ | ||
public double Value { get; set; } | ||
} | ||
|
||
public class DashboardGaugeDataSource | ||
: List<DashboardGaugeDataSourceItem> | ||
{ | ||
public DashboardGaugeDataSource() | ||
{ | ||
this.Add(new DashboardGaugeDataSourceItem() | ||
{ | ||
Value = 40 | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
@using IgniteUI.Blazor.Controls | ||
@using IgniteUI.Blazor.Controls; | ||
@using System; | ||
|
||
<div class="container vertical"> | ||
<div class="legend-title"> | ||
Renewable Energy Consumption | ||
</div> | ||
<div class="legend"> | ||
<IgbLegend | ||
Name="legend" | ||
@ref="legend" | ||
Orientation="LegendOrientation.Horizontal"> | ||
</IgbLegend> | ||
|
||
</div> | ||
<div class="container vertical fill"> | ||
<IgbDataChart | ||
Name="chart" | ||
@ref="chart" | ||
IsHorizontalZoomEnabled="false" | ||
IsVerticalZoomEnabled="false" | ||
SelectionMode="SeriesSelectionMode.SelectionColorFill" | ||
SelectionBehavior="SeriesSelectionBehavior.Auto" | ||
SelectionBrush="orange"> | ||
<IgbCategoryYAxis | ||
Name="yAxis" | ||
@ref="yAxis" | ||
DataSource="EnergyRenewableConsumption" | ||
Label="Location" | ||
IsInverted="true"> | ||
</IgbCategoryYAxis> | ||
|
||
<IgbNumericXAxis | ||
Name="xAxis" | ||
@ref="xAxis" | ||
MinimumValue="0" | ||
Title="TWh"> | ||
</IgbNumericXAxis> | ||
|
||
<IgbStacked100BarSeries | ||
Name="stacked100BarSeries" | ||
@ref="stacked100BarSeries" | ||
DataSource="EnergyRenewableConsumption" | ||
XAxisName="xAxis" | ||
YAxisName="yAxis" | ||
ShowDefaultTooltip="true" | ||
AreaFillOpacity="1"> | ||
<IgbStackedFragmentSeries | ||
Name="s1" | ||
@ref="s1" | ||
ValueMemberPath="Hydro" | ||
Title="@("Hydro")"> | ||
</IgbStackedFragmentSeries> | ||
|
||
<IgbStackedFragmentSeries | ||
Name="s2" | ||
@ref="s2" | ||
ValueMemberPath="Wind" | ||
Title="@("Wind")"> | ||
</IgbStackedFragmentSeries> | ||
|
||
<IgbStackedFragmentSeries | ||
Name="s3" | ||
@ref="s3" | ||
ValueMemberPath="Solar" | ||
Title="@("Solar")"> | ||
</IgbStackedFragmentSeries> | ||
|
||
<IgbStackedFragmentSeries | ||
Name="s4" | ||
@ref="s4" | ||
ValueMemberPath="Other" | ||
Title="@("Other")"> | ||
</IgbStackedFragmentSeries> | ||
|
||
</IgbStacked100BarSeries> | ||
|
||
<IgbDataToolTipLayer | ||
Name="dataToolTipLayer" | ||
@ref="dataToolTipLayer"> | ||
</IgbDataToolTipLayer> | ||
|
||
</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 yAxis = this.yAxis; | ||
var xAxis = this.xAxis; | ||
var stacked100BarSeries = this.stacked100BarSeries; | ||
var s1 = this.s1; | ||
var s2 = this.s2; | ||
var s3 = this.s3; | ||
var s4 = this.s4; | ||
var dataToolTipLayer = this.dataToolTipLayer; | ||
|
||
this.BindElements = () => { | ||
chart.Legend = this.legend; | ||
}; | ||
this.BindElements(); | ||
|
||
if (firstRender) { | ||
this.SelectionMatcherOnViewInit(); | ||
} | ||
} | ||
|
||
private IgbLegend legend; | ||
private IgbDataChart chart; | ||
private IgbCategoryYAxis yAxis; | ||
private IgbNumericXAxis xAxis; | ||
private IgbStacked100BarSeries stacked100BarSeries; | ||
private IgbStackedFragmentSeries s1; | ||
private IgbStackedFragmentSeries s2; | ||
private IgbStackedFragmentSeries s3; | ||
private IgbStackedFragmentSeries s4; | ||
private IgbDataToolTipLayer dataToolTipLayer; | ||
|
||
private System.Threading.Timer _timer; | ||
|
||
private void SelectionMatcherOnViewInit() | ||
{ | ||
_timer = new System.Threading.Timer((_) => | ||
{ | ||
addSelection(); | ||
}, null, 1000, 0); | ||
_timer = null; | ||
} | ||
|
||
private void addSelection() | ||
{ | ||
var chart = this.chart; | ||
|
||
IgbChartSelection selection = new IgbChartSelection(); | ||
selection.Item = EnergyRenewableConsumption[1]; | ||
IgbSeriesMatcher matcher = new IgbSeriesMatcher(); | ||
matcher.MemberPath = "Hydro"; | ||
matcher.MemberPathType = "ValueMemberPath"; | ||
selection.Matcher = matcher; | ||
|
||
chart.SelectedSeriesItems.Add(selection); | ||
|
||
IgbChartSelection selection2 = new IgbChartSelection(); | ||
selection2 = new IgbChartSelection(); | ||
selection2.Item = EnergyRenewableConsumption[2]; | ||
matcher = new IgbSeriesMatcher(); | ||
matcher.MemberPath = "Wind"; | ||
matcher.MemberPathType = "ValueMemberPath"; | ||
selection2.Matcher = matcher; | ||
|
||
chart.SelectedSeriesItems.Add(selection2); | ||
} | ||
|
||
private EnergyRenewableConsumption _energyRenewableConsumption = null; | ||
public EnergyRenewableConsumption EnergyRenewableConsumption | ||
{ | ||
get | ||
{ | ||
if (_energyRenewableConsumption == null) | ||
{ | ||
_energyRenewableConsumption = new EnergyRenewableConsumption(); | ||
} | ||
return _energyRenewableConsumption; | ||
} | ||
} | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
samples/charts/data-chart/selection-matcher/BlazorClientApp.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net9.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="24.2.71" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0" /> | ||
<PackageReference Include="System.Net.Http.Json" Version="9.0.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
25 changes: 25 additions & 0 deletions
25
samples/charts/data-chart/selection-matcher/BlazorClientApp.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
64 changes: 64 additions & 0 deletions
64
samples/charts/data-chart/selection-matcher/EnergyRenewableConsumption.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
public class EnergyRenewableConsumptionItem | ||
{ | ||
public string Location { get; set; } | ||
public double Year { get; set; } | ||
public double Hydro { get; set; } | ||
public double Solar { get; set; } | ||
public double Wind { get; set; } | ||
public double Other { get; set; } | ||
} | ||
|
||
public class EnergyRenewableConsumption | ||
: List<EnergyRenewableConsumptionItem> | ||
{ | ||
public EnergyRenewableConsumption() | ||
{ | ||
this.Add(new EnergyRenewableConsumptionItem() | ||
{ | ||
Location = @"China", | ||
Year = 2019, | ||
Hydro = 1269.5, | ||
Solar = 223, | ||
Wind = 405.2, | ||
Other = 102.8 | ||
}); | ||
this.Add(new EnergyRenewableConsumptionItem() | ||
{ | ||
Location = @"Europe", | ||
Year = 2019, | ||
Hydro = 632.54, | ||
Solar = 154, | ||
Wind = 461.3, | ||
Other = 220.3 | ||
}); | ||
this.Add(new EnergyRenewableConsumptionItem() | ||
{ | ||
Location = @"USA", | ||
Year = 2019, | ||
Hydro = 271.16, | ||
Solar = 108, | ||
Wind = 303.4, | ||
Other = 78.34 | ||
}); | ||
this.Add(new EnergyRenewableConsumptionItem() | ||
{ | ||
Location = @"Brazil", | ||
Year = 2019, | ||
Hydro = 399.3, | ||
Solar = 5.5, | ||
Wind = 55.83, | ||
Other = 56.25 | ||
}); | ||
this.Add(new EnergyRenewableConsumptionItem() | ||
{ | ||
Location = @"Canada", | ||
Year = 2019, | ||
Hydro = 381.98, | ||
Solar = 4.3, | ||
Wind = 34.17, | ||
Other = 10.81 | ||
}); | ||
} | ||
} |
Oops, something went wrong.