Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

Commit a276725

Browse files
authored
Merge pull request #520 from telerik/development
Merge development into master
2 parents 2e8b6ee + fbf9d9e commit a276725

21 files changed

+290
-51
lines changed

BuildTools/BuildNuGet.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
SET MSBUILD=%WINDIR%\microsoft.net\framework\v4.0.30319\MSBuild.exe
2-
%MSBUILD% BuildNuget.UWP.proj /property:Version=1.0.2.10
2+
%MSBUILD% BuildNuget.UWP.proj /property:Version=1.0.2.11

BuildTools/BuildNuget.UWP.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<Target Name="PrepareNugetProperties">
1616

1717
<PropertyGroup>
18-
<Version Condition= " '$(Version)' == '' ">1.0.2.10</Version>
18+
<Version Condition= " '$(Version)' == '' ">1.0.2.11</Version>
1919
<FullPathDeployDirectory>$([System.IO.Path]::GetFullPath('$(DeployDirectory)'))</FullPathDeployDirectory>
2020
<BinariesSubDir>$(BinariesTargetDirectory)</BinariesSubDir>
2121

BuildTools/Nuspecs.UWP/Package.UniversalWindowsPlatform.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<icon>images\uwp.png</icon>
1313
<requireLicenseAcceptance>true</requireLicenseAcceptance>
1414
<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>
15-
<releaseNotes>For full release notes see https://github.com/telerik/UI-For-UWP/releases/tag/1.0.2.10</releaseNotes>
15+
<releaseNotes>For full release notes see https://github.com/telerik/UI-For-UWP/releases/tag/1.0.2.11</releaseNotes>
1616
<tags>UWP Windows Telerik Controls XAML C#</tags>
1717
<language>en-US</language>
1818
</metadata>

Controls/Chart/Chart.UWP/Visualization/CartesianChart/Indicators/BollingerBandsIndicator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ internal override void UpdateUICore(ChartLayoutContext context)
122122

123123
this.lowerBandRenderer.Render(this.drawWithComposition);
124124

125-
if (this.drawWithComposition && this.lowerBandRenderer.renderPoints.Count > 2)
125+
if (this.drawWithComposition && this.lowerBandRenderer.renderPoints.Count >= 2)
126126
{
127127
foreach (DataPointSegment dataSegment in ChartSeriesRenderer.GetDataSegments(this.lowerBandRenderer.renderPoints))
128128
{

Controls/Chart/Chart.UWP/Visualization/CartesianChart/Indicators/LineIndicatorBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ internal override void UpdateUICore(ChartLayoutContext context)
136136

137137
this.renderer.Render(this.drawWithComposition);
138138

139-
if (this.drawWithComposition && this.renderer.renderPoints.Count > 2)
139+
if (this.drawWithComposition && this.renderer.renderPoints.Count >= 2)
140140
{
141141
foreach (DataPointSegment dataSegment in ChartSeriesRenderer.GetDataSegments(this.renderer.renderPoints))
142142
{

Controls/Chart/Chart.UWP/Visualization/CartesianChart/Indicators/StochasticFastIndicator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ internal override void UpdateUICore(ChartLayoutContext context)
135135

136136
this.signalRenderer.Render(this.drawWithComposition);
137137

138-
if (this.drawWithComposition && this.signalRenderer.renderPoints.Count > 2)
138+
if (this.drawWithComposition && this.signalRenderer.renderPoints.Count >= 2)
139139
{
140140
foreach (DataPointSegment dataSegment in ChartSeriesRenderer.GetDataSegments(this.signalRenderer.renderPoints))
141141
{

Controls/Chart/Chart.UWP/Visualization/CartesianChart/Series/Categorical/CategoricalStrokedSeries.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ internal override void UpdateUICore(ChartLayoutContext context)
153153
{
154154
this.renderer.Render(this.drawWithComposition);
155155

156-
if (this.drawWithComposition && this.renderer.renderPoints.Count > 2)
156+
if (this.drawWithComposition && this.renderer.renderPoints.Count >= 2)
157157
{
158158
foreach (DataPointSegment dataSegment in ChartSeriesRenderer.GetDataSegments(this.renderer.renderPoints))
159159
{

Controls/Chart/Chart.UWP/Visualization/CartesianChart/Series/Categorical/SplineAreaSeries.cs

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
using System;
1+
using Telerik.Core;
22
using Telerik.UI.Automation.Peers;
3+
using Windows.UI.Xaml;
34
using Windows.UI.Xaml.Automation.Peers;
45

56
namespace Telerik.UI.Xaml.Controls.Chart
@@ -9,6 +10,12 @@ namespace Telerik.UI.Xaml.Controls.Chart
910
/// </summary>
1011
public class SplineAreaSeries : AreaSeries
1112
{
13+
/// <summary>
14+
/// Identifies the <see cref="SplineTension"/> property.
15+
/// </summary>
16+
public static readonly DependencyProperty SplineTensionProperty =
17+
DependencyProperty.Register("SplineTension", typeof(double), typeof(SplineAreaSeries), new PropertyMetadata(SplineHelper.DefaultTension, OnSplineTensionChanged));
18+
1219
/// <summary>
1320
/// Initializes a new instance of the <see cref="SplineAreaSeries"/> class.
1421
/// </summary>
@@ -17,15 +24,37 @@ public SplineAreaSeries()
1724
this.DefaultStyleKey = typeof(SplineAreaSeries);
1825
}
1926

27+
/// <summary>
28+
/// Gets or sets the <see cref="SplineTension"/> that is used to determine the tension of the additional spline points.
29+
/// The default value is 0.5d. The tension works with relative values between 0 and 1.
30+
/// Values outside this range will be coerced internally.
31+
/// </summary>
32+
public double SplineTension
33+
{
34+
get { return (double)this.GetValue(SplineTensionProperty); }
35+
set { this.SetValue(SplineTensionProperty, value); }
36+
}
37+
2038
internal override LineRenderer CreateRenderer()
2139
{
22-
return new SplineAreaRenderer();
40+
return new SplineAreaRenderer()
41+
{
42+
splineTension = this.SplineTension
43+
};
2344
}
2445

2546
/// <inheritdoc/>
2647
protected override AutomationPeer OnCreateAutomationPeer()
2748
{
2849
return new SplineAreaSeriesAutomationPeer(this);
2950
}
51+
52+
private static void OnSplineTensionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
53+
{
54+
SplineAreaSeries series = (SplineAreaSeries)d;
55+
SplineAreaRenderer renderer = (SplineAreaRenderer)series.renderer;
56+
renderer.splineTension = RadMath.CoerceValue((double)e.NewValue, SplineHelper.MinTension, SplineHelper.MaxTension);
57+
series.InvalidateCore();
58+
}
3059
}
3160
}
Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
using System;
1+
using Telerik.Core;
22
using Telerik.UI.Automation.Peers;
3+
using Windows.UI.Xaml;
34
using Windows.UI.Xaml.Automation.Peers;
45

56
namespace Telerik.UI.Xaml.Controls.Chart
67
{
78
/// <summary>
8-
/// Visualizes a collection of data points using a smooth <see cref="Windows.UI.Xaml.Shapes.Line"/> shape.
9+
/// Visualizes a collection of data points using a smooth <see cref="Microsoft.UI.Xaml.Shapes.Line"/> shape.
910
/// </summary>
1011
public class SplineSeries : LineSeries
1112
{
13+
/// <summary>
14+
/// Identifies the <see cref="SplineTension"/> property.
15+
/// </summary>
16+
public static readonly DependencyProperty SplineTensionProperty =
17+
DependencyProperty.Register("SplineTension", typeof(double), typeof(SplineSeries), new PropertyMetadata(SplineHelper.DefaultTension, OnSplineTensionChanged));
18+
1219
/// <summary>
1320
/// Initializes a new instance of the <see cref="SplineSeries"/> class.
1421
/// </summary>
@@ -17,15 +24,37 @@ public SplineSeries()
1724
this.DefaultStyleKey = typeof(SplineSeries);
1825
}
1926

27+
/// <summary>
28+
/// Gets or sets the <see cref="SplineTension"/> that is used to determine the tension of the additional spline points.
29+
/// The default value is 0.5d. The tension works with relative values between 0 and 1.
30+
/// Values outside this range will be coerced internally.
31+
/// </summary>
32+
public double SplineTension
33+
{
34+
get { return (double)this.GetValue(SplineTensionProperty); }
35+
set { this.SetValue(SplineTensionProperty, value); }
36+
}
37+
2038
internal override LineRenderer CreateRenderer()
2139
{
22-
return new SplineRenderer();
40+
return new SplineRenderer()
41+
{
42+
splineTension = this.SplineTension
43+
};
2344
}
2445

2546
/// <inheritdoc/>
2647
protected override AutomationPeer OnCreateAutomationPeer()
2748
{
2849
return new SplineSeriesAutomationPeer(this);
2950
}
51+
52+
private static void OnSplineTensionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
53+
{
54+
SplineSeries series = (SplineSeries)d;
55+
SplineRenderer renderer = (SplineRenderer)series.renderer;
56+
renderer.splineTension = RadMath.CoerceValue((double)e.NewValue, SplineHelper.MinTension, SplineHelper.MaxTension);
57+
series.InvalidateCore();
58+
}
3059
}
3160
}

Controls/Chart/Chart.UWP/Visualization/CartesianChart/Series/Scatter/ScatterLineSeries.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ internal override void UpdateUICore(ChartLayoutContext context)
168168
{
169169
this.renderer.Render(this.drawWithComposition);
170170

171-
if (this.drawWithComposition && this.renderer.renderPoints.Count > 2)
171+
if (this.drawWithComposition && this.renderer.renderPoints.Count >= 2)
172172
{
173173
foreach (DataPointSegment dataSegment in ChartSeriesRenderer.GetDataSegments(this.renderer.renderPoints))
174174
{

0 commit comments

Comments
 (0)