From cf82a9769894cab86a913d6b2e1844d1cbf5d59b Mon Sep 17 00:00:00 2001 From: mattosaurus Date: Fri, 26 Jul 2019 16:56:34 +0100 Subject: [PATCH 1/2] Fix animation type --- src/ChartJSCore/Models/Enums.cs | 35 +++++++++++++++++++ .../Models/Options/Animation/Animation.cs | 3 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/ChartJSCore/Models/Enums.cs b/src/ChartJSCore/Models/Enums.cs index 38b9b8a..92b30ee 100644 --- a/src/ChartJSCore/Models/Enums.cs +++ b/src/ChartJSCore/Models/Enums.cs @@ -14,5 +14,40 @@ public enum ChartType : byte HorizontalBar = 7, Scatter = 8 } + + public enum Easing + { + Linear, + EaseInQuad, + EaseOutQuad, + EaseInOutQuad, + EaseInCubic, + EaseOutCubic, + EaseInOutCubic, + EaseInQuart, + EaseOutQuart, + EaseInOutQuart, + EaseInQuint, + EaseOutQuint, + EaseInOutQuint, + EaseInSine, + EaseOutSine, + EaseInOutSine, + EaseInExpo, + EaseOutExpo, + EaseInOutExpo, + EaseInCirc, + EaseOutCirc, + EaseInOutCirc, + EaseInElastic, + EaseOutElastic, + EaseInOutElastic, + EaseInBack, + EaseOutBack, + EaseInOutBack, + EaseInBounce, + EaseOutBounce, + EaseInOutBounce + } } } diff --git a/src/ChartJSCore/Models/Options/Animation/Animation.cs b/src/ChartJSCore/Models/Options/Animation/Animation.cs index cdf7883..b1756a0 100644 --- a/src/ChartJSCore/Models/Options/Animation/Animation.cs +++ b/src/ChartJSCore/Models/Options/Animation/Animation.cs @@ -1,5 +1,6 @@ using ChartJSCore.Helpers; using Newtonsoft.Json; +using static ChartJSCore.Models.Enums; namespace ChartJSCore.Models { @@ -13,7 +14,7 @@ public class Animation : Base /// /// Easing function to use. Available options are: 'linear', 'easeInQuad', 'easeOutQuad', 'easeInOutQuad', 'easeInCubic', 'easeOutCubic', 'easeInOutCubic', 'easeInQuart', 'easeOutQuart', 'easeInOutQuart', 'easeInQuint', 'easeOutQuint', 'easeInOutQuint', 'easeInSine', 'easeOutSine', 'easeInOutSine', 'easeInExpo', 'easeOutExpo', 'easeInOutExpo', 'easeInCirc', 'easeOutCirc', 'easeInOutCirc', 'easeInElastic', 'easeOutElastic', 'easeInOutElastic', 'easeInBack', 'easeOutBack', 'easeInOutBack', 'easeInBounce', 'easeOutBounce', 'easeInOutBounce'. /// - public int? Easing { get; set; } + public Easing? Easing { get; set; } /// /// Callback called on each step of an animation. Passed a single argument, an object, containing the chart instance and an object with details of the animation. From 43558dbc25a979f6732b1f578ac454188b14b722 Mon Sep 17 00:00:00 2001 From: mattosaurus Date: Fri, 26 Jul 2019 16:57:27 +0100 Subject: [PATCH 2/2] Update properties --- src/ChartJSCore/ChartJSCore.csproj | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ChartJSCore/ChartJSCore.csproj b/src/ChartJSCore/ChartJSCore.csproj index 8ba41ac..bf07f43 100644 --- a/src/ChartJSCore/ChartJSCore.csproj +++ b/src/ChartJSCore/ChartJSCore.csproj @@ -11,16 +11,15 @@ false false false - 1.5.1 + 1.5.2 True https://github.com/mattosaurus/ChartJSCore Chart.js chart graph chartjs https://github.com/mattosaurus/ChartJSCore AnyCPU;x64 - 1.5.1.0 - 1.5.1.0 - Version 1.5.1 - Fixed color culture issue -Version 1.5.0 - BREAKING CHANGE: Update to add color object by Davee02 + 1.5.2.0 + 1.5.2.0 + Version 1.5.2 - Fixed animation type bug mattosaurus true MIT