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.6.4.1 #723

Merged
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 @@ -39,14 +39,12 @@
ComputedPlotAreaMarginMode="ComputedPlotAreaMarginMode.Series"
IsHorizontalZoomEnabled="false"
IsVerticalZoomEnabled="false"
IncludedProperties="@(new string[] { "Month", "Temperature" })"
DataSource="TemperatureAnnotatedData"
IsCategoryHighlightingEnabled="true"
HighlightingMode="SeriesHighlightingMode.FadeOthersSpecific"
HighlightingBehavior="SeriesHighlightingBehavior.NearestItemsAndSeries"
CrosshairsAnnotationYAxisPrecision="0"
YAxisMaximumValue="35"
YAxisLabelLocation="YAxisLabelLocation.OutsideRight">
YAxisLabelLocation="YAxisLabelLocation.OutsideRight"
ToolTipType="ToolTipType.None">
</IgbCategoryChart>

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
@ref="chart"
ChartType="CategoryChartType.Column"
DataSource="SalesData"
InitialGroups="MonthName"
InitialGroups="Month"
InitialHighlightFilter="Country ne 'UK'"
HighlightedValuesDisplayMode="SeriesHighlightedValuesDisplayMode.Hidden">
</IgbCategoryChart>
Expand Down
17,721 changes: 16,674 additions & 1,047 deletions samples/charts/category-chart/chart-highlight-filter/SalesData.cs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions samples/charts/category-chart/data-aggregations/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
Label="Initial Groups"
ValueType="PropertyEditorValueType.EnumValue"
ShouldOverrideDefaultEditor="true"
DropDownNames="@(new string[] { "Country", "Product", "MonthName", "Year" })"
DropDownValues="@(new string[] { "Country", "Product", "MonthName", "Year" })"
DropDownNames="@(new string[] { "Country", "Product", "Month", "Year" })"
DropDownValues="@(new string[] { "Country", "Product", "Month", "Year" })"
PrimitiveValue="@("Country")"
Changed="EditorChangeUpdateInitialGroups">
</IgbPropertyEditorPropertyDescription>
Expand Down
17,721 changes: 16,674 additions & 1,047 deletions samples/charts/category-chart/data-aggregations/SalesData.cs

Large diffs are not rendered by default.

33 changes: 16 additions & 17 deletions samples/charts/category-chart/data-filter/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,21 @@
IsWrappingEnabled="true">
<IgbPropertyEditorPropertyDescription
PropertyPath="InitialFilterHandler"
EditorWidth="800"
Name="InitialFilter"
@ref="initialFilter"
Label="Modify Chart Filter"
ValueType="PropertyEditorValueType.StringValue"
Label="Modify Filter"
ValueType="PropertyEditorValueType.EnumValue"
ShouldOverrideDefaultEditor="true"
Changed="EditorChangeUpdateInitialFilter">
DropDownNames="@(new string[] { "1950", "1960", "1970", "1980", "1990", "2000", "2010", "2020" })"
DropDownValues="@(new string[] { "1950", "1960", "1970", "1980", "1990", "2000", "2010", "2020" })"
Changed="EditorChangeDataFilter">
</IgbPropertyEditorPropertyDescription>

</IgbPropertyEditorPanel>

</div>
<div class="legend-title">
Sales Filtered by Country, Product, and Dates
Annual Birth Rates by World Region
</div>
<div class="legend">
<IgbLegend
Expand All @@ -41,13 +42,12 @@
<IgbCategoryChart
Name="chart"
@ref="chart"
DataSource="SalesData"
DataSource="ContinentsBirthRate"
ChartType="CategoryChartType.Column"
IsHorizontalZoomEnabled="false"
IsVerticalZoomEnabled="false"
CrosshairsDisplayMode="CrosshairsDisplayMode.None"
IncludedProperties="@(new string[] { "Date", "GrossSales", "Profit", "Sales" })"
InitialFilter="(startswith(Country, 'B') and endswith(Country, 'l') and contains(Product, 'Royal Oak') and contains(Date, '3/1/20'))">
YAxisLabelFormat="{0}M">
</IgbCategoryChart>

</div>
Expand Down Expand Up @@ -77,24 +77,23 @@
private IgbPropertyEditorPropertyDescription initialFilter;
private IgbCategoryChart chart;

public void EditorChangeUpdateInitialFilter(IgbPropertyEditorPropertyDescriptionChangedEventArgs args)
public void EditorChangeDataFilter(IgbPropertyEditorPropertyDescriptionChangedEventArgs args)
{
var chart = this.chart;
var intialFilterVal = args.NewValue.ToString();
chart.InitialFilter = null;
chart.InitialFilter = intialFilterVal;
var filter = args.NewValue.ToString();
chart.InitialFilter = "(contains(Year," + "'" + filter + "'" + "))";
}

private SalesData _salesData = null;
public SalesData SalesData
private ContinentsBirthRate _continentsBirthRate = null;
public ContinentsBirthRate ContinentsBirthRate
{
get
{
if (_salesData == null)
if (_continentsBirthRate == null)
{
_salesData = new SalesData();
_continentsBirthRate = new ContinentsBirthRate();
}
return _salesData;
return _continentsBirthRate;
}
}

Expand Down
100 changes: 100 additions & 0 deletions samples/charts/category-chart/data-filter/ContinentsBirthRate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
public class ContinentsBirthRateItem
{
public string Year { get; set; }
public double Asia { get; set; }
public double Africa { get; set; }
public double Europe { get; set; }
public double NorthAmerica { get; set; }
public double SouthAmerica { get; set; }
public double Oceania { get; set; }
}

public class ContinentsBirthRate
: List<ContinentsBirthRateItem>
{
public ContinentsBirthRate()
{
this.Add(new ContinentsBirthRateItem()
{
Year = @"1950",
Asia = 62,
Africa = 13,
Europe = 10,
NorthAmerica = 4,
SouthAmerica = 8,
Oceania = 1
});
this.Add(new ContinentsBirthRateItem()
{
Year = @"1960",
Asia = 68,
Africa = 12,
Europe = 15,
NorthAmerica = 4,
SouthAmerica = 9,
Oceania = 2
});
this.Add(new ContinentsBirthRateItem()
{
Year = @"1970",
Asia = 80,
Africa = 17,
Europe = 11,
NorthAmerica = 3,
SouthAmerica = 9,
Oceania = 1
});
this.Add(new ContinentsBirthRateItem()
{
Year = @"1980",
Asia = 77,
Africa = 21,
Europe = 12,
NorthAmerica = 3,
SouthAmerica = 10,
Oceania = 2
});
this.Add(new ContinentsBirthRateItem()
{
Year = @"1990",
Asia = 87,
Africa = 24,
Europe = 9,
NorthAmerica = 3,
SouthAmerica = 10,
Oceania = 1
});
this.Add(new ContinentsBirthRateItem()
{
Year = @"2000",
Asia = 79,
Africa = 28,
Europe = 8,
NorthAmerica = 4,
SouthAmerica = 9,
Oceania = 3
});
this.Add(new ContinentsBirthRateItem()
{
Year = @"2010",
Asia = 78,
Africa = 35,
Europe = 10,
NorthAmerica = 4,
SouthAmerica = 8,
Oceania = 2
});
this.Add(new ContinentsBirthRateItem()
{
Year = @"2020",
Asia = 75,
Africa = 43,
Europe = 7,
NorthAmerica = 4,
SouthAmerica = 7,
Oceania = 4
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
DataSource="TemperatureAnnotatedData"
HighlightingMode="SeriesHighlightingMode.Brighten"
HighlightingBehavior="SeriesHighlightingBehavior.DirectlyOver"
CrosshairsAnnotationEnabled="false"
ToolTipType="ToolTipType.None"
CrosshairsDisplayMode="CrosshairsDisplayMode.None">
</IgbCategoryChart>
Expand Down
1 change: 0 additions & 1 deletion samples/charts/category-chart/highlighting-mode/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
IsVerticalZoomEnabled="false"
DataSource="TemperatureAnnotatedData"
HighlightingMode="SeriesHighlightingMode.BrightenSpecific"
CrosshairsAnnotationEnabled="false"
ToolTipType="ToolTipType.None"
CrosshairsDisplayMode="CrosshairsDisplayMode.None">
</IgbCategoryChart>
Expand Down
52 changes: 34 additions & 18 deletions samples/charts/data-chart/data-legend/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,11 @@
XMemberPath="DeathRate"
YMemberPath="BirthRate"
RadiusMemberPath="Population"
RadiusScale="SizeScale1"
Title="Africa"
RadiusMemberAsLegendLabel="Population: "
XMemberAsLegendLabel="Death Rate: "
YMemberAsLegendLabel="Birth Rate: ">
<IgbSizeScale
Name="SizeScale1"
@ref="sizeScale1"
MinimumValue="10"
MaximumValue="50">
</IgbSizeScale>

</IgbBubbleSeries>

<IgbBubbleSeries
Expand All @@ -64,17 +58,11 @@
XMemberPath="DeathRate"
YMemberPath="BirthRate"
RadiusMemberPath="Population"
RadiusScale="SizeScale2"
Title="Europe"
RadiusMemberAsLegendLabel="Population: "
XMemberAsLegendLabel="Death Rate: "
YMemberAsLegendLabel="Birth Rate: ">
<IgbSizeScale
Name="SizeScale2"
@ref="sizeScale2"
MinimumValue="10"
MaximumValue="50">
</IgbSizeScale>

</IgbBubbleSeries>

<IgbCrosshairLayer
Expand All @@ -98,9 +86,7 @@
var xAxis = this.xAxis;
var yAxis = this.yAxis;
var bubbleSeries1 = this.bubbleSeries1;
var sizeScale1 = this.sizeScale1;
var bubbleSeries2 = this.bubbleSeries2;
var sizeScale2 = this.sizeScale2;
var crosshairLayer = this.crosshairLayer;

this.BindElements = () => {
Expand All @@ -115,9 +101,39 @@
private IgbNumericXAxis xAxis;
private IgbNumericYAxis yAxis;
private IgbBubbleSeries bubbleSeries1;
private IgbSizeScale sizeScale1;
private IgbSizeScale _sizeScale1 = null;
public IgbSizeScale SizeScale1
{
get
{
if (this._sizeScale1 == null)
{
var SizeScale1 = new IgbSizeScale();
SizeScale1.Name = "SizeScale1";
SizeScale1.MinimumValue = 10;
SizeScale1.MaximumValue = 50;
this._sizeScale1 = SizeScale1;
}
return this._sizeScale1;
}
}
private IgbBubbleSeries bubbleSeries2;
private IgbSizeScale sizeScale2;
private IgbSizeScale _sizeScale2 = null;
public IgbSizeScale SizeScale2
{
get
{
if (this._sizeScale2 == null)
{
var SizeScale2 = new IgbSizeScale();
SizeScale2.Name = "SizeScale2";
SizeScale2.MinimumValue = 10;
SizeScale2.MaximumValue = 50;
this._sizeScale2 = SizeScale2;
}
return this._sizeScale2;
}
}
private IgbCrosshairLayer crosshairLayer;

private CountryDemographicAfrican _countryDemographicAfrican = null;
Expand Down
Loading
Loading