forked from radzenhq/radzen-blazor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRadzenColumnOptions.cs
45 lines (40 loc) · 1.53 KB
/
RadzenColumnOptions.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
using Microsoft.AspNetCore.Components;
namespace Radzen.Blazor
{
/// <summary>
/// Common configuration of <see cref="RadzenColumnSeries{TItem}" />.
/// </summary>
public partial class RadzenColumnOptions : RadzenChartComponentBase
{
/// <summary>
/// Gets or sets the border radius of the bars.
/// </summary>
/// <value>The radius. Values greater than <c>0</c> make rounded corners.</value>
[Parameter]
public double Radius { get; set; }
/// <summary>
/// Gets or sets the margin between columns.
/// </summary>
/// <value>The margin. By default set to <c>10</c></value>
[Parameter]
public double Margin { get; set; } = 10;
/// <summary>
/// Gets or sets the width of all columns in pixels. By default it is automatically calculated depending on the chart width.
/// </summary>
/// <value>The pixel width of the column. By default set to <c>null</c></value>
[Parameter]
public double? Width { get; set;}
/// <inheritdoc />
protected override void Initialize()
{
Chart.ColumnOptions = this;
}
/// <inheritdoc />
protected override bool ShouldRefreshChart(ParameterView parameters)
{
return DidParameterChange(parameters, nameof(Radius), Radius) ||
DidParameterChange(parameters, nameof(Width), Width) ||
DidParameterChange(parameters, nameof(Margin), Margin);
}
}
}