Skip to content

Commit

Permalink
Adding changes from build igniteui-xplat-examples-output+PRs_2025.1.31.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tfsbuild committed Jan 31, 2025
1 parent c0a9f4d commit 04c3b4b
Show file tree
Hide file tree
Showing 13 changed files with 438 additions and 16 deletions.
16 changes: 9 additions & 7 deletions samples/charts/category-chart/selection-matcher/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
_timer = new System.Threading.Timer((_) =>
{
addSelection();
}, null, 100, 0);
}, null, 1000, 0);
_timer = null;
}

private void addSelection()
Expand All @@ -71,20 +72,21 @@
IgbChartSelection selection = new IgbChartSelection();
selection.Item = EnergyRenewableConsumption[1];
IgbSeriesMatcher matcher = new IgbSeriesMatcher();
matcher.MemberPath = "Solar";
matcher.MemberPath = "Hydro";
matcher.MemberPathType = "ValueMemberPath";
selection.Matcher = matcher;

chart.SelectedSeriesItems.Add(selection);

selection = new IgbChartSelection();
selection.Item = EnergyRenewableConsumption[1];
IgbChartSelection selection2 = new IgbChartSelection();
selection2 = new IgbChartSelection();
selection2.Item = EnergyRenewableConsumption[2];
matcher = new IgbSeriesMatcher();
matcher.MemberPath = "Hydro";
matcher.MemberPath = "Wind";
matcher.MemberPathType = "ValueMemberPath";
selection.Matcher = matcher;
selection2.Matcher = matcher;

chart.SelectedSeriesItems.Add(selection);
chart.SelectedSeriesItems.Add(selection2);
}

private EnergyRenewableConsumption _energyRenewableConsumption = null;
Expand Down
20 changes: 12 additions & 8 deletions samples/charts/dashboard-tile/gauge-dashboard/App.razor
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
@using IgniteUI.Blazor.Controls
@using IgniteUI.Blazor.Controls;
@using System;

<div class="container vertical">
<div class="container vertical fill">
<IgbDashboardTile
TileTitle="Sample Gauge"
Name="dashboard"
@ref="dashboard">
@ref="dashboard"
DataSource="DashboardGaugeDataSource">
</IgbDashboardTile>

</div>
Expand All @@ -19,16 +18,21 @@
{
var dashboard = this.dashboard;

if (firstRender) {
this.DashboardTileGaugeOnInit();
}
}

private IgbDashboardTile dashboard;

public void DashboardTileGaugeOnInit()
private DashboardGaugeDataSource _dashboardGaugeDataSource = null;
public DashboardGaugeDataSource DashboardGaugeDataSource
{
this.dashboard.DataSource = 40;
get
{
if (_dashboardGaugeDataSource == null)
{
_dashboardGaugeDataSource = new DashboardGaugeDataSource();
}
return _dashboardGaugeDataSource;
}
}

}
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
});
}
}
175 changes: 175 additions & 0 deletions samples/charts/data-chart/selection-matcher/App.razor
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 samples/charts/data-chart/selection-matcher/BlazorClientApp.csproj
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 samples/charts/data-chart/selection-matcher/BlazorClientApp.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 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,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
});
}
}
Loading

0 comments on commit 04c3b4b

Please sign in to comment.