This repository has been archived by the owner on Apr 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathBaseConfigOptions.cs
48 lines (41 loc) · 1.7 KB
/
BaseConfigOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using ChartJs.Blazor.ChartJS.Common.Legends;
using ChartJs.Blazor.ChartJS.Common.Properties;
namespace ChartJs.Blazor.ChartJS.Common
{
/// <summary>
/// The base config for the options-subconfig of a chart
/// </summary>
public class BaseConfigOptions
{
/// <summary>
/// Represents the title of this chart
/// </summary>
public OptionsTitle Title { get; set; }
/// <summary>
/// Resizes the chart canvas when its container does.
/// <para>See important note: https://www.chartjs.org/docs/latest/general/responsive.html#important-note </para>
/// </summary>
public bool Responsive { get; set; } = true;
/// <summary>
/// Canvas aspect ratio (i.e. width / height, a value of 1 representing a square canvas).
/// <para>Note that this option is ignored if the height is explicitly defined either as attribute (of the canvas) or via the style.</para>
/// </summary>
public double AspectRatio { get; set; } = 2;
/// <summary>
/// Maintain the original canvas aspect ratio (width / height) when resizing.
/// </summary>
public bool MaintainAspectRatio { get; set; } = true;
/// <summary>
/// Duration in milliseconds it takes to animate to new size after a resize event.
/// </summary>
public int ResponsiveAnimationDuration { get; set; }
/// <summary>
/// The legend for this chart
/// </summary>
public Legend Legend { get; set; } = new Legend();
/// <summary>
/// Gets or sets the tooltip options for this chart.
/// </summary>
public Tooltips Tooltips { get; set; }
}
}