Skip to content

Commit

Permalink
Merge pull request #520 from telerik/development
Browse files Browse the repository at this point in the history
Merge development into master
  • Loading branch information
polqnaP committed Mar 15, 2023
2 parents 2e8b6ee + fbf9d9e commit a276725
Show file tree
Hide file tree
Showing 21 changed files with 290 additions and 51 deletions.
2 changes: 1 addition & 1 deletion BuildTools/BuildNuGet.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SET MSBUILD=%WINDIR%\microsoft.net\framework\v4.0.30319\MSBuild.exe
%MSBUILD% BuildNuget.UWP.proj /property:Version=1.0.2.10
%MSBUILD% BuildNuget.UWP.proj /property:Version=1.0.2.11
2 changes: 1 addition & 1 deletion BuildTools/BuildNuget.UWP.proj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Target Name="PrepareNugetProperties">

<PropertyGroup>
<Version Condition= " '$(Version)' == '' ">1.0.2.10</Version>
<Version Condition= " '$(Version)' == '' ">1.0.2.11</Version>
<FullPathDeployDirectory>$([System.IO.Path]::GetFullPath('$(DeployDirectory)'))</FullPathDeployDirectory>
<BinariesSubDir>$(BinariesTargetDirectory)</BinariesSubDir>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<icon>images\uwp.png</icon>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>UI for Universal Windows Platform is a toolset for building Universal Windows Platform apps for the Windows Store and the enterprise. The library is designed to offer the same user experience, functionality and behavior on Windows devices of all form factors.</description>
<releaseNotes>For full release notes see https://github.com/telerik/UI-For-UWP/releases/tag/1.0.2.10</releaseNotes>
<releaseNotes>For full release notes see https://github.com/telerik/UI-For-UWP/releases/tag/1.0.2.11</releaseNotes>
<tags>UWP Windows Telerik Controls XAML C#</tags>
<language>en-US</language>
</metadata>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ internal override void UpdateUICore(ChartLayoutContext context)

this.lowerBandRenderer.Render(this.drawWithComposition);

if (this.drawWithComposition && this.lowerBandRenderer.renderPoints.Count > 2)
if (this.drawWithComposition && this.lowerBandRenderer.renderPoints.Count >= 2)
{
foreach (DataPointSegment dataSegment in ChartSeriesRenderer.GetDataSegments(this.lowerBandRenderer.renderPoints))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ internal override void UpdateUICore(ChartLayoutContext context)

this.renderer.Render(this.drawWithComposition);

if (this.drawWithComposition && this.renderer.renderPoints.Count > 2)
if (this.drawWithComposition && this.renderer.renderPoints.Count >= 2)
{
foreach (DataPointSegment dataSegment in ChartSeriesRenderer.GetDataSegments(this.renderer.renderPoints))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ internal override void UpdateUICore(ChartLayoutContext context)

this.signalRenderer.Render(this.drawWithComposition);

if (this.drawWithComposition && this.signalRenderer.renderPoints.Count > 2)
if (this.drawWithComposition && this.signalRenderer.renderPoints.Count >= 2)
{
foreach (DataPointSegment dataSegment in ChartSeriesRenderer.GetDataSegments(this.signalRenderer.renderPoints))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ internal override void UpdateUICore(ChartLayoutContext context)
{
this.renderer.Render(this.drawWithComposition);

if (this.drawWithComposition && this.renderer.renderPoints.Count > 2)
if (this.drawWithComposition && this.renderer.renderPoints.Count >= 2)
{
foreach (DataPointSegment dataSegment in ChartSeriesRenderer.GetDataSegments(this.renderer.renderPoints))
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using Telerik.Core;
using Telerik.UI.Automation.Peers;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Automation.Peers;

namespace Telerik.UI.Xaml.Controls.Chart
Expand All @@ -9,6 +10,12 @@ namespace Telerik.UI.Xaml.Controls.Chart
/// </summary>
public class SplineAreaSeries : AreaSeries
{
/// <summary>
/// Identifies the <see cref="SplineTension"/> property.
/// </summary>
public static readonly DependencyProperty SplineTensionProperty =
DependencyProperty.Register("SplineTension", typeof(double), typeof(SplineAreaSeries), new PropertyMetadata(SplineHelper.DefaultTension, OnSplineTensionChanged));

/// <summary>
/// Initializes a new instance of the <see cref="SplineAreaSeries"/> class.
/// </summary>
Expand All @@ -17,15 +24,37 @@ public SplineAreaSeries()
this.DefaultStyleKey = typeof(SplineAreaSeries);
}

/// <summary>
/// Gets or sets the <see cref="SplineTension"/> that is used to determine the tension of the additional spline points.
/// The default value is 0.5d. The tension works with relative values between 0 and 1.
/// Values outside this range will be coerced internally.
/// </summary>
public double SplineTension
{
get { return (double)this.GetValue(SplineTensionProperty); }
set { this.SetValue(SplineTensionProperty, value); }
}

internal override LineRenderer CreateRenderer()
{
return new SplineAreaRenderer();
return new SplineAreaRenderer()
{
splineTension = this.SplineTension
};
}

/// <inheritdoc/>
protected override AutomationPeer OnCreateAutomationPeer()
{
return new SplineAreaSeriesAutomationPeer(this);
}

private static void OnSplineTensionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
SplineAreaSeries series = (SplineAreaSeries)d;
SplineAreaRenderer renderer = (SplineAreaRenderer)series.renderer;
renderer.splineTension = RadMath.CoerceValue((double)e.NewValue, SplineHelper.MinTension, SplineHelper.MaxTension);
series.InvalidateCore();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
using System;
using Telerik.Core;
using Telerik.UI.Automation.Peers;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Automation.Peers;

namespace Telerik.UI.Xaml.Controls.Chart
{
/// <summary>
/// Visualizes a collection of data points using a smooth <see cref="Windows.UI.Xaml.Shapes.Line"/> shape.
/// Visualizes a collection of data points using a smooth <see cref="Microsoft.UI.Xaml.Shapes.Line"/> shape.
/// </summary>
public class SplineSeries : LineSeries
{
/// <summary>
/// Identifies the <see cref="SplineTension"/> property.
/// </summary>
public static readonly DependencyProperty SplineTensionProperty =
DependencyProperty.Register("SplineTension", typeof(double), typeof(SplineSeries), new PropertyMetadata(SplineHelper.DefaultTension, OnSplineTensionChanged));

/// <summary>
/// Initializes a new instance of the <see cref="SplineSeries"/> class.
/// </summary>
Expand All @@ -17,15 +24,37 @@ public SplineSeries()
this.DefaultStyleKey = typeof(SplineSeries);
}

/// <summary>
/// Gets or sets the <see cref="SplineTension"/> that is used to determine the tension of the additional spline points.
/// The default value is 0.5d. The tension works with relative values between 0 and 1.
/// Values outside this range will be coerced internally.
/// </summary>
public double SplineTension
{
get { return (double)this.GetValue(SplineTensionProperty); }
set { this.SetValue(SplineTensionProperty, value); }
}

internal override LineRenderer CreateRenderer()
{
return new SplineRenderer();
return new SplineRenderer()
{
splineTension = this.SplineTension
};
}

/// <inheritdoc/>
protected override AutomationPeer OnCreateAutomationPeer()
{
return new SplineSeriesAutomationPeer(this);
}

private static void OnSplineTensionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
SplineSeries series = (SplineSeries)d;
SplineRenderer renderer = (SplineRenderer)series.renderer;
renderer.splineTension = RadMath.CoerceValue((double)e.NewValue, SplineHelper.MinTension, SplineHelper.MaxTension);
series.InvalidateCore();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ internal override void UpdateUICore(ChartLayoutContext context)
{
this.renderer.Render(this.drawWithComposition);

if (this.drawWithComposition && this.renderer.renderPoints.Count > 2)
if (this.drawWithComposition && this.renderer.renderPoints.Count >= 2)
{
foreach (DataPointSegment dataSegment in ChartSeriesRenderer.GetDataSegments(this.renderer.renderPoints))
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using Telerik.Charting;
using Telerik.Charting;
using Telerik.Core;
using Telerik.UI.Automation.Peers;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Automation.Peers;

namespace Telerik.UI.Xaml.Controls.Chart
Expand All @@ -10,6 +11,12 @@ namespace Telerik.UI.Xaml.Controls.Chart
/// </summary>
public class ScatterSplineAreaSeries : ScatterAreaSeries
{
/// <summary>
/// Identifies the <see cref="SplineTension"/> property.
/// </summary>
public static readonly DependencyProperty SplineTensionProperty =
DependencyProperty.Register("SplineTension", typeof(double), typeof(ScatterSplineAreaSeries), new PropertyMetadata(SplineHelper.DefaultTension, OnSplineTensionChanged));

/// <summary>
/// Initializes a new instance of the <see cref="ScatterSplineAreaSeries"/> class.
/// </summary>
Expand All @@ -18,15 +25,37 @@ public ScatterSplineAreaSeries()
this.DefaultStyleKey = typeof(ScatterSplineAreaSeries);
}

/// <summary>
/// Gets or sets the <see cref="SplineTension"/> that is used to determine the tension of the additional spline points.
/// The default value is 0.5d. The tension works with relative values between 0 and 1.
/// Values outside this range will be coerced internally.
/// </summary>
public double SplineTension
{
get { return (double)this.GetValue(SplineTensionProperty); }
set { this.SetValue(SplineTensionProperty, value); }
}

internal override LineRenderer CreateRenderer()
{
return new SplineAreaRenderer();
return new SplineAreaRenderer()
{
splineTension = this.SplineTension
};
}

/// <inheritdoc/>
protected override AutomationPeer OnCreateAutomationPeer()
{
return new ScatterSplineAreaSeriesAutomationPeer(this);
}

private static void OnSplineTensionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
ScatterSplineAreaSeries series = (ScatterSplineAreaSeries)d;
SplineAreaRenderer renderer = (SplineAreaRenderer)series.renderer;
renderer.splineTension = RadMath.CoerceValue((double)e.NewValue, SplineHelper.MinTension, SplineHelper.MaxTension);
series.InvalidateCore();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using Telerik.Charting;
using Telerik.Charting;
using Telerik.Core;
using Telerik.UI.Automation.Peers;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Automation.Peers;

namespace Telerik.UI.Xaml.Controls.Chart
Expand All @@ -10,6 +11,12 @@ namespace Telerik.UI.Xaml.Controls.Chart
/// </summary>
public class ScatterSplineSeries : ScatterLineSeries
{
/// <summary>
/// Identifies the <see cref="SplineTension"/> property.
/// </summary>
public static readonly DependencyProperty SplineTensionProperty =
DependencyProperty.Register("SplineTension", typeof(double), typeof(ScatterSplineSeries), new PropertyMetadata(SplineHelper.DefaultTension, OnSplineTensionChanged));

/// <summary>
/// Initializes a new instance of the <see cref="ScatterSplineSeries"/> class.
/// </summary>
Expand All @@ -18,15 +25,37 @@ public ScatterSplineSeries()
this.DefaultStyleKey = typeof(ScatterSplineSeries);
}

/// <summary>
/// Gets or sets the <see cref="SplineTension"/> that is used to determine the tension of the additional spline points.
/// The default value is 0.5d. The tension works with relative values between 0 and 1.
/// Values outside this range will be coerced internally.
/// </summary>
public double SplineTension
{
get { return (double)this.GetValue(SplineTensionProperty); }
set { this.SetValue(SplineTensionProperty, value); }
}

internal override LineRenderer CreateRenderer()
{
return new SplineRenderer();
return new SplineRenderer()
{
splineTension = this.SplineTension
};
}

/// <inheritdoc/>
protected override AutomationPeer OnCreateAutomationPeer()
{
return new ScatterSplineSeriesAutomationPeer(this);
}

private static void OnSplineTensionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
ScatterSplineSeries series = (ScatterSplineSeries)d;
SplineRenderer renderer = (SplineRenderer)series.renderer;
renderer.splineTension = RadMath.CoerceValue((double)e.NewValue, SplineHelper.MinTension, SplineHelper.MaxTension);
series.InvalidateCore();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ namespace Telerik.UI.Xaml.Controls.Chart
{
internal class SplineAreaRenderer : AreaRenderer
{
internal double splineTension;

protected override IEnumerable<Point> GetTopPoints(DataPointSegment segment)
{
// return the first point since spline segmentation skips it
Expand All @@ -15,7 +17,7 @@ protected override IEnumerable<Point> GetTopPoints(DataPointSegment segment)
IChartView view = this.model.GetChartArea().view;
double scaleFactor = Math.Abs(view.ZoomWidth - view.ZoomHeight) / 2;

foreach (Point point in SplineHelper.GetSplinePoints(this.renderPoints, segment, scaleFactor))
foreach (Point point in SplineHelper.GetSplinePoints(this.renderPoints, segment, scaleFactor, this.splineTension))
{
yield return point;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ namespace Telerik.UI.Xaml.Controls.Chart
{
internal class SplineRenderer : LineRenderer
{
internal double splineTension;

protected internal override IEnumerable<Point> GetPoints(DataPointSegment segment)
{
// return the first point since spline segmentation skips it
Expand All @@ -15,7 +17,7 @@ protected internal override IEnumerable<Point> GetPoints(DataPointSegment segmen
IChartView view = this.model.GetChartArea().view;
double scaleFactor = Math.Abs(view.ZoomWidth - view.ZoomHeight) / 2;

foreach (Point point in SplineHelper.GetSplinePoints(this.renderPoints, segment, scaleFactor))
foreach (Point point in SplineHelper.GetSplinePoints(this.renderPoints, segment, scaleFactor, this.splineTension))
{
yield return point;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace Telerik.UI.Xaml.Controls.Chart
{
internal class PolarSplineRenderer : PolarLineRenderer
{
internal double splineTension;

protected internal override IEnumerable<Point> GetPoints(DataPointSegment segment)
{
// return the first point since spline segmentation skips it
Expand All @@ -16,7 +18,7 @@ protected internal override IEnumerable<Point> GetPoints(DataPointSegment segmen
IChartView view = this.model.GetChartArea().view;
double scaleFactor = Math.Abs(view.ZoomWidth - view.ZoomHeight) / 2;

foreach (Point point in SplineHelper.GetSplinePoints(this.renderPoints, segment, scaleFactor, this.isClosed))
foreach (Point point in SplineHelper.GetSplinePoints(this.renderPoints, segment, scaleFactor, this.splineTension, this.isClosed))
{
yield return point;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace Telerik.UI.Xaml.Controls.Chart
{
internal class RadarSplineRenderer : RadarLineRenderer
{
internal double splineTension;

protected internal override IEnumerable<Point> GetPoints(DataPointSegment segment)
{
// return the first point since spline segmentation skips it
Expand All @@ -16,7 +18,7 @@ protected internal override IEnumerable<Point> GetPoints(DataPointSegment segmen
IChartView view = this.model.GetChartArea().view;
double scaleFactor = Math.Abs(view.ZoomWidth - view.ZoomHeight) / 2;

foreach (Point point in SplineHelper.GetSplinePoints(this.renderPoints, segment, scaleFactor, this.isClosed))
foreach (Point point in SplineHelper.GetSplinePoints(this.renderPoints, segment, scaleFactor, this.splineTension, this.isClosed))
{
yield return point;
}
Expand Down

0 comments on commit a276725

Please sign in to comment.