using RobotNet.WebApp.Charts.Enums;
using System.Text.Json.Serialization;
namespace RobotNet.WebApp.Charts.Models.Common.Plugins;
public class ChartPluginsTooltip
{
///
/// Background color of the tooltip.
///
public string BackgroundColor { get; set; } = "rgba(0, 0, 0, 0.8)";
///
/// Gets or sets which elements appear in the tooltip.
///
public InteractionMode Mode { get; set; }
///
/// Gets or sets the value indicating if the hover mode only applies when the mouse position intersects an item on the chart.
///
public bool? Intersect { get; set; }
///
/// The mode for positioning the tooltip.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public TooltipPosition? Position { get; set; } = TooltipPosition.Average;
///
/// Horizontal alignment of the body text lines. left/right/center.
///
public TooltipXAlignment BodyAlign { get; set; } = TooltipXAlignment.Left;
///
/// Color of body text.
///
public string BodyColor { get; set; } = "#fff";
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ChartFont? BodyFont { get; set; }
///
/// Spacing to add to top and bottom of each tooltip item.
///
public int BodySpacing { get; set; } = 2;
///
/// Padding for Tooltips
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ChartPadding? Padding { get; set; }
///
/// Extra distance to move the end of the tooltip arrow away from the tooltip point.
///
public int CaretPadding { get; set; } = 2;
///
/// Size, in px, of the tooltip arrow.
///
public int CaretSize { get; set; } = 5;
///
/// If , color boxes are shown in the tooltip.
///
public bool DisplayColors { get; set; } = true;
///
/// Are on-canvas tooltips enabled?
///
public bool Enabled { get; set; } = true;
///
/// Horizontal alignment of the footer text lines. left/right/center.
///
public TooltipXAlignment FooterAlign { get; set; } = TooltipXAlignment.Left;
///
/// Color of footer text.
///
public string FooterColor { get; set; } = "#fff";
public ChartFont FooterFont { get; set; } = new();
///
/// Margin to add before drawing the footer.
///
public int FooterMarginTop { get; set; } = 6;
///
/// Spacing to add to top and bottom of each footer line.
///
public int FooterSpacing { get; set; } = 2;
///
/// Horizontal alignment of the title text lines. left/right/center.
///
public TooltipXAlignment TitleAlign { get; set; } = TooltipXAlignment.Left;
///
/// Color of title text.
///
public string TitleColor { get; set; } = "#fff";
public ChartFont TitleFont { get; set; } = new();
///
/// Margin to add on bottom of title section.
///
public int TitleMarginBottom { get; set; } = 6;
///
/// Spacing to add to top and bottom of each title line.
///
public int TitleSpacing { get; set; } = 2;
///
/// Position of the tooltip caret in the X direction. left/center/right.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public TooltipXAlignment? XAlign { get; set; }
///
/// Position of the tooltip caret in the Y direction. top/center/bottom.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public TooltipYAlignment? YAlign { get; set; }
///
/// Width of the color box if displayColors is true.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? BoxWidth { get; set; }
///
/// Height of the color box if displayColors is true.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? BoxHeight { get; set; }
///
/// Padding between the color box and the text.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? BoxPadding { get; set; }
///
/// Size of the border.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? BorderWidth { get; set; }
///
/// Color of the border.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? BorderColor { get; set; }
///
/// Use the corresponding point style (from dataset options) instead of color boxes, ex: star, triangle etc. (size is based on the minimum value between boxWidth and boxHeight).
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? UsePointStyle { get; set; } = false;
///
/// true for rendering the tooltip from right to left.
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? Rtl { get; set; }
///
/// This will force the text direction 'rtl' or 'ltr' on the canvas for rendering the tooltips, regardless of the css specified on the canvas
///
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? TextDirection { get; set; }
}