Skip to content

Commit

Permalink
Merge pull request #39 from mattosaurus/development
Browse files Browse the repository at this point in the history
Fix animation easing type
  • Loading branch information
mattosaurus authored Jul 26, 2019
2 parents 3ded7a5 + 43558db commit 2c398c9
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/ChartJSCore/ChartJSCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Version>1.5.1</Version>
<Version>1.5.2</Version>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<RepositoryUrl>https://github.com/mattosaurus/ChartJSCore</RepositoryUrl>
<PackageTags>Chart.js chart graph chartjs</PackageTags>
<PackageProjectUrl>https://github.com/mattosaurus/ChartJSCore</PackageProjectUrl>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyVersion>1.5.1.0</AssemblyVersion>
<FileVersion>1.5.1.0</FileVersion>
<PackageReleaseNotes>Version 1.5.1 - Fixed color culture issue
Version 1.5.0 - BREAKING CHANGE: Update to add color object by Davee02</PackageReleaseNotes>
<AssemblyVersion>1.5.2.0</AssemblyVersion>
<FileVersion>1.5.2.0</FileVersion>
<PackageReleaseNotes>Version 1.5.2 - Fixed animation type bug</PackageReleaseNotes>
<Authors>mattosaurus</Authors>
<PackOnBuild>true</PackOnBuild>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
35 changes: 35 additions & 0 deletions src/ChartJSCore/Models/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
3 changes: 2 additions & 1 deletion src/ChartJSCore/Models/Options/Animation/Animation.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using ChartJSCore.Helpers;
using Newtonsoft.Json;
using static ChartJSCore.Models.Enums;

namespace ChartJSCore.Models
{
Expand All @@ -13,7 +14,7 @@ public class Animation : Base
/// <summary>
/// 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'.
/// </summary>
public int? Easing { get; set; }
public Easing? Easing { get; set; }

/// <summary>
/// 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.
Expand Down

0 comments on commit 2c398c9

Please sign in to comment.