Skip to content
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
4 changes: 2 additions & 2 deletions samples/charts/category-chart/marker-options/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
Label="Marker Type"
ShouldOverrideDefaultEditor="true"
ValueType="PropertyEditorValueType.EnumValue"
DropDownValues="@(new string[] { "Circle", "Automatic", "Triangle", "Pyramid", "Square", "Diamond", "Pentagon", "Hexagon", "Tetragram", "Pentagram", "Hexagram", "None" })"
DropDownNames="@(new string[] { "Circle", "Automatic", "Triangle", "Pyramid", "Square", "Diamond", "Pentagon", "Hexagon", "Tetragram", "Pentagram", "Hexagram", "None" })"
DropDownValues="@(new string[] { "Circle", "Checkmark", "Automatic", "Triangle", "Pyramid", "Square", "Diamond", "Pentagon", "Hexagon", "Tetragram", "Pentagram", "Hexagram", "None" })"
DropDownNames="@(new string[] { "Circle", "Checkmark", "Automatic", "Triangle", "Pyramid", "Square", "Diamond", "Pentagon", "Hexagon", "Tetragram", "Pentagram", "Hexagram", "None" })"
PrimitiveValue="@("Circle")"
Changed="EditorChangeUpdateMarkerType">
</IgbPropertyEditorPropertyDescription>
Expand Down
197 changes: 197 additions & 0 deletions samples/charts/data-chart/scatter-marker-options/App.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
@using IgniteUI.Blazor.Controls
@using System

<div class="container vertical">
<div class="options vertical">
<IgbPropertyEditorPanel
Name="PropertyEditor"
@ref="propertyEditor"

DescriptionType="DataChart"
IsHorizontal="true"
IsWrappingEnabled="true">
<IgbPropertyEditorPropertyDescription
PropertyPath="MarkerSizeHandler"
Name="MarkerSizeEditor"
@ref="markerSizeEditor"
Label="Marker Size"
ShouldOverrideDefaultEditor="true"
ValueType="PropertyEditorValueType.EnumValue"
DropDownNames="@(new string[] { "3", "5", "7", "10", "12", "15", "20", "25", "30" })"
DropDownValues="@(new string[] { "3", "5", "7", "10", "12", "15", "20", "25", "30" })"
PrimitiveValue="@("10")"
Changed="EditorChangeUpdateDataChartMarkerSize">
</IgbPropertyEditorPropertyDescription>

<IgbPropertyEditorPropertyDescription
PropertyPath="MarkerTypeHandler"
Name="MarkerTypeEditor"
@ref="markerTypeEditor"
Label="Marker Type"
ShouldOverrideDefaultEditor="true"
ValueType="PropertyEditorValueType.EnumValue"
DropDownValues="@(new string[] { "Circle", "Checkmark", "Triangle", "Pyramid", "Square", "Diamond", "Pentagon", "Hexagon", "Tetragram", "Pentagram", "Hexagram", "Hidden", "Automatic", "None" })"
DropDownNames="@(new string[] { "Circle", "Checkmark", "Triangle", "Pyramid", "Square", "Diamond", "Pentagon", "Hexagon", "Tetragram", "Pentagram", "Hexagram", "Hidden", "Automatic", "None" })"
PrimitiveValue="@("Circle")"
Changed="EditorChangeUpdateDataChartMarkerType">
</IgbPropertyEditorPropertyDescription>

</IgbPropertyEditorPanel>

</div>
<div class="legend-title">
Population Statistics for Selected Continents
</div>
<div class="legend">
<IgbLegend
Name="legend"
@ref="legend"
Orientation="LegendOrientation.Horizontal">
</IgbLegend>

</div>
<div class="container vertical fill">
<IgbDataChart
Name="chart"
@ref="chart">
<IgbNumericXAxis
Name="xAxis"
@ref="xAxis"
Title="Death Rate (per 1,000 people)"
MinimumValue="5"
MaximumValue="15">
</IgbNumericXAxis>

<IgbNumericYAxis
Name="yAxis"
@ref="yAxis"
Title="Birth Rate (per 1,000 people)"
MinimumValue="0"
MaximumValue="50"
Interval="10">
</IgbNumericYAxis>

<IgbScatterSeries
Name="scatterSeries1"
@ref="scatterSeries1"
Title="Europe"
XAxisName="xAxis"
YAxisName="yAxis"
XMemberPath="DeathRate"
YMemberPath="BirthRate"
DataSource="CountryDemographicEurope"
MarkerType="MarkerType.Circle"
MarkerSize="10"
ShowDefaultTooltip="true">
</IgbScatterSeries>

<IgbScatterSeries
Name="scatterSeries2"
@ref="scatterSeries2"
Title="Africa"
XAxisName="xAxis"
YAxisName="yAxis"
XMemberPath="DeathRate"
YMemberPath="BirthRate"
DataSource="CountryDemographicAfrican"
MarkerType="MarkerType.Circle"
MarkerSize="10"
ShowDefaultTooltip="true">
</IgbScatterSeries>

</IgbDataChart>

</div>
</div>

@code {

private Action BindElements { get; set; }

protected override async Task OnAfterRenderAsync(bool firstRender)
{
var propertyEditor = this.propertyEditor;
var markerSizeEditor = this.markerSizeEditor;
var markerTypeEditor = this.markerTypeEditor;
var legend = this.legend;
var chart = this.chart;
var xAxis = this.xAxis;
var yAxis = this.yAxis;
var scatterSeries1 = this.scatterSeries1;
var scatterSeries2 = this.scatterSeries2;

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

}

private IgbPropertyEditorPanel propertyEditor;
private IgbPropertyEditorPropertyDescription markerSizeEditor;
private IgbPropertyEditorPropertyDescription markerTypeEditor;
private IgbLegend legend;
private IgbDataChart chart;
private IgbNumericXAxis xAxis;
private IgbNumericYAxis yAxis;
private IgbScatterSeries scatterSeries1;
private IgbScatterSeries scatterSeries2;

public void EditorChangeUpdateDataChartMarkerSize(IgbPropertyEditorPropertyDescriptionChangedEventArgs args)
{
var chart = this.chart;
var markerSizeVal = Convert.ToInt32(args.NewValue);
var series = chart.ActualSeries;
for (var i = 0; i < series.Count; i++)
{
var markerSeries = series[i] as IgbMarkerSeries;
if (markerSeries != null)
{
markerSeries.MarkerSize = markerSizeVal;
}
}
}

public void EditorChangeUpdateDataChartMarkerType(IgbPropertyEditorPropertyDescriptionChangedEventArgs args)
{
var chart = this.chart;
var markerTypeVal = (MarkerType)Enum.Parse(typeof(MarkerType), args.NewValue.ToString());
var series = chart.ActualSeries;
for (var i = 0; i < series.Count; i++)
{
var markerSeries = series[i] as IgbMarkerSeries;
if (markerSeries != null)
{
markerSeries.MarkerType = markerTypeVal;
}
}
}

private CountryDemographicEurope _countryDemographicEurope = null;
public CountryDemographicEurope CountryDemographicEurope
{
get
{
if (_countryDemographicEurope == null)
{
_countryDemographicEurope = new CountryDemographicEurope();
}
return _countryDemographicEurope;
}
}

private CountryDemographicAfrican _countryDemographicAfrican = null;
public CountryDemographicAfrican CountryDemographicAfrican
{
get
{
if (_countryDemographicAfrican == null)
{
_countryDemographicAfrican = new CountryDemographicAfrican();
}
return _countryDemographicAfrican;
}
}

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

<PropertyGroup>
<TargetFramework>net10.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.Trial" Version="25.2.83" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.1" />
<PackageReference Include="System.Net.Http.Json" Version="10.0.1" />
</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,71 @@
using System;
using System.Collections.Generic;
public class CountryDemographicAfricanItem
{
public double Population { get; set; }
public double BirthRate { get; set; }
public double DeathRate { get; set; }
public string Name { get; set; }
}

public class CountryDemographicAfrican
: List<CountryDemographicAfricanItem>
{
public CountryDemographicAfrican()
{
this.Add(new CountryDemographicAfricanItem() { Population = 39728000, BirthRate = 23.9, DeathRate = 4.77, Name = @"Algeria" });
this.Add(new CountryDemographicAfricanItem() { Population = 27884000, BirthRate = 42.32, DeathRate = 8.68, Name = @"Angola" });
this.Add(new CountryDemographicAfricanItem() { Population = 10576000, BirthRate = 37.43, DeathRate = 9.32, Name = @"Benin" });
this.Add(new CountryDemographicAfricanItem() { Population = 2121000, BirthRate = 24.14, DeathRate = 7.02, Name = @"Botswana" });
this.Add(new CountryDemographicAfricanItem() { Population = 18111000, BirthRate = 39.44, DeathRate = 8.82, Name = @"Burkina Faso" });
this.Add(new CountryDemographicAfricanItem() { Population = 10160000, BirthRate = 42.66, DeathRate = 11.03, Name = @"Burundi" });
this.Add(new CountryDemographicAfricanItem() { Population = 23298000, BirthRate = 36.84, DeathRate = 10.35, Name = @"Cameroon" });
this.Add(new CountryDemographicAfricanItem() { Population = 525000, BirthRate = 21.14, DeathRate = 5.61, Name = @"Cape Verde" });
this.Add(new CountryDemographicAfricanItem() { Population = 4493000, BirthRate = 36.11, DeathRate = 14.01, Name = @"C.A.R." });
this.Add(new CountryDemographicAfricanItem() { Population = 14111000, BirthRate = 43.86, DeathRate = 13.22, Name = @"Chad" });
this.Add(new CountryDemographicAfricanItem() { Population = 777000, BirthRate = 33.33, DeathRate = 7.49, Name = @"Comoros" });
this.Add(new CountryDemographicAfricanItem() { Population = 4856000, BirthRate = 35.23, DeathRate = 7.56, Name = @"Congo" });
this.Add(new CountryDemographicAfricanItem() { Population = 23226000, BirthRate = 37.1, DeathRate = 12.54, Name = @"Cote Ivoire" });
this.Add(new CountryDemographicAfricanItem() { Population = 76245000, BirthRate = 42.81, DeathRate = 10.19, Name = @"DCongo" });
this.Add(new CountryDemographicAfricanItem() { Population = 914000, BirthRate = 23.35, DeathRate = 8.37, Name = @"Djibouti" });
this.Add(new CountryDemographicAfricanItem() { Population = 92443000, BirthRate = 27.2, DeathRate = 5.96, Name = @"Egypt" });
this.Add(new CountryDemographicAfricanItem() { Population = 1169000, BirthRate = 34.64, DeathRate = 10.34, Name = @"Equatorial Guinea" });
this.Add(new CountryDemographicAfricanItem() { Population = 3343000, BirthRate = 32.83, DeathRate = 7.07, Name = @"Eritrea" });
this.Add(new CountryDemographicAfricanItem() { Population = 100835000, BirthRate = 32.3, DeathRate = 7, Name = @"Ethiopia" });
this.Add(new CountryDemographicAfricanItem() { Population = 1948000, BirthRate = 30.09, DeathRate = 7.82, Name = @"Gabon" });
this.Add(new CountryDemographicAfricanItem() { Population = 2086000, BirthRate = 39.99, DeathRate = 8.2, Name = @"Gambia" });
this.Add(new CountryDemographicAfricanItem() { Population = 27849000, BirthRate = 31.56, DeathRate = 8.31, Name = @"Ghana" });
this.Add(new CountryDemographicAfricanItem() { Population = 11432000, BirthRate = 36.36, DeathRate = 9.58, Name = @"Guinea" });
this.Add(new CountryDemographicAfricanItem() { Population = 1737000, BirthRate = 37.15, DeathRate = 10.78, Name = @"Guinea-Bissau" });
this.Add(new CountryDemographicAfricanItem() { Population = 47878000, BirthRate = 31.78, DeathRate = 5.84, Name = @"Kenya" });
this.Add(new CountryDemographicAfricanItem() { Population = 2059000, BirthRate = 28.16, DeathRate = 12.92, Name = @"Lesotho" });
this.Add(new CountryDemographicAfricanItem() { Population = 4472000, BirthRate = 34.72, DeathRate = 8.12, Name = @"Liberia" });
this.Add(new CountryDemographicAfricanItem() { Population = 6418000, BirthRate = 20.19, DeathRate = 5.2, Name = @"Libya" });
this.Add(new CountryDemographicAfricanItem() { Population = 24234000, BirthRate = 33.4, DeathRate = 6.48, Name = @"Madagascar" });
this.Add(new CountryDemographicAfricanItem() { Population = 16745000, BirthRate = 37.05, DeathRate = 7.5, Name = @"Malawi" });
this.Add(new CountryDemographicAfricanItem() { Population = 17439000, BirthRate = 43.22, DeathRate = 10.67, Name = @"Mali" });
this.Add(new CountryDemographicAfricanItem() { Population = 4046000, BirthRate = 34.57, DeathRate = 7.96, Name = @"Mauritania" });
this.Add(new CountryDemographicAfricanItem() { Population = 1259000, BirthRate = 10.1, DeathRate = 7.7, Name = @"Mauritius" });
this.Add(new CountryDemographicAfricanItem() { Population = 34664000, BirthRate = 20.4, DeathRate = 5.15, Name = @"Morocco" });
this.Add(new CountryDemographicAfricanItem() { Population = 27042000, BirthRate = 39.36, DeathRate = 10.38, Name = @"Mozambique" });
this.Add(new CountryDemographicAfricanItem() { Population = 2315000, BirthRate = 29.59, DeathRate = 7.46, Name = @"Namibia" });
this.Add(new CountryDemographicAfricanItem() { Population = 20002000, BirthRate = 48.44, DeathRate = 9.94, Name = @"Niger" });
this.Add(new CountryDemographicAfricanItem() { Population = 181136992, BirthRate = 39.37, DeathRate = 12.77, Name = @"Nigeria" });
this.Add(new CountryDemographicAfricanItem() { Population = 11369000, BirthRate = 31.79, DeathRate = 6.13, Name = @"Rwanda" });
this.Add(new CountryDemographicAfricanItem() { Population = 199000, BirthRate = 34.33, DeathRate = 6.81, Name = @"Sao Tome and Principe" });
this.Add(new CountryDemographicAfricanItem() { Population = 14578000, BirthRate = 36.21, DeathRate = 6.07, Name = @"Senegal" });
this.Add(new CountryDemographicAfricanItem() { Population = 95000, BirthRate = 17, DeathRate = 7.5, Name = @"Seychelles" });
this.Add(new CountryDemographicAfricanItem() { Population = 7172000, BirthRate = 35.61, DeathRate = 13.03, Name = @"Sierra Leone" });
this.Add(new CountryDemographicAfricanItem() { Population = 13797000, BirthRate = 43.66, DeathRate = 11.63, Name = @"Somalia" });
this.Add(new CountryDemographicAfricanItem() { Population = 55386000, BirthRate = 21.3, DeathRate = 10.1, Name = @"South Africa" });
this.Add(new CountryDemographicAfricanItem() { Population = 10716000, BirthRate = 36.32, DeathRate = 11.24, Name = @"South Sudan" });
this.Add(new CountryDemographicAfricanItem() { Population = 38903000, BirthRate = 33.32, DeathRate = 7.52, Name = @"Sudan" });
this.Add(new CountryDemographicAfricanItem() { Population = 1104000, BirthRate = 29.27, DeathRate = 9.86, Name = @"Swaziland" });
this.Add(new CountryDemographicAfricanItem() { Population = 51483000, BirthRate = 38.64, DeathRate = 7.02, Name = @"Tanzania" });
this.Add(new CountryDemographicAfricanItem() { Population = 7323000, BirthRate = 34.53, DeathRate = 8.83, Name = @"Togo" });
this.Add(new CountryDemographicAfricanItem() { Population = 11180000, BirthRate = 18.65, DeathRate = 6.36, Name = @"Tunisia" });
this.Add(new CountryDemographicAfricanItem() { Population = 38225000, BirthRate = 42.63, DeathRate = 8.87, Name = @"Uganda" });
this.Add(new CountryDemographicAfricanItem() { Population = 15879000, BirthRate = 38.44, DeathRate = 8, Name = @"Zambia" });
this.Add(new CountryDemographicAfricanItem() { Population = 13815000, BirthRate = 33.94, DeathRate = 8.4, Name = @"Zimbabwe" });
}
}
Loading