Skip to content

Commit

Permalink
Update padding
Browse files Browse the repository at this point in the history
  • Loading branch information
mattosaurus committed Mar 11, 2022
1 parent 1503214 commit 98e2d3c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/ChartJSCore/Models/Options/Legend/LegendLabel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public class LegendLabel : Base
/// <summary>
/// Padding between rows of colored boxes.
/// </summary>
public int? Padding { get; set; }
[JsonConverter(typeof(PaddingConverter))]
public Padding Padding { get; set; }

/// <summary>
/// Generates legend items for each thing in the legend. Default implementation returns the text + styling for the color box.
Expand Down
8 changes: 6 additions & 2 deletions src/ChartJSCore/Models/Options/Scales/Ticks/CartesianTick.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
namespace ChartJSCore.Models
using ChartJSCore.Helpers;
using Newtonsoft.Json;

namespace ChartJSCore.Models
{
public class CartesianTick : Tick
{
Expand Down Expand Up @@ -35,6 +38,7 @@ public class CartesianTick : Tick
/// <summary>
/// Padding between the tick label and the axis. When set on a vertical axis, this applies in the horizontal (X) direction. When set on a horizontal axis, this applies in the vertical (Y) direction.
/// </summary>
public int? Padding { get; set; }
[JsonConverter(typeof(PaddingConverter))]
public Padding Padding { get; set; }
}
}
12 changes: 3 additions & 9 deletions src/ChartJSCore/Models/Options/Scales/Ticks/RadialLinearTick.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using ChartJSCore.Helpers;
using Newtonsoft.Json;

namespace ChartJSCore.Models
{
Expand All @@ -9,15 +10,8 @@ public class RadialLinearTick : RadialTick
/// </summary>
public ChartColor BackdropColor { get; set; }

/// <summary>
/// Horizontal padding of label backdrop.
/// </summary>
public int? BackdropPaddingX { get; set; }

/// <summary>
/// Vertical padding of label backdrop.
/// </summary>
public int? BackdropPaddingY { get; set; }
[JsonConverter(typeof(PaddingConverter))]
public Padding BackdropPadding { get; set; }

/// <summary>
/// If true, scale will include 0 if it is not already included.
Expand Down

0 comments on commit 98e2d3c

Please sign in to comment.