-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathTable.fs
More file actions
86 lines (77 loc) · 2.69 KB
/
Table.fs
File metadata and controls
86 lines (77 loc) · 2.69 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
namespace Plotly.NET.TraceObjects
open Plotly.NET
open Plotly.NET.LayoutObjects
open DynamicObj
open System
open System.Runtime.InteropServices
/// CellColor type inherits from dynamic object
type TableFill() =
inherit DynamicObj()
static member init(?Color: Color) =
TableFill() |> TableFill.style (?Color = Color)
static member style(?Color: Color) =
fun (fill: TableFill) ->
fill
|> DynObj.withOptionalProperty "color" Color
/// Cells type inherits from dynamic object
type TableCells() =
inherit DynamicObj()
/// Initialized Cells object
static member init
(
?Align: StyleParam.HorizontalAlign,
?MultiAlign: seq<StyleParam.HorizontalAlign>,
?Fill: TableFill,
?Font: Font,
?Format: seq<string>,
?Height: int,
?Line: Line,
?Prefix: string,
?MultiPrefix: seq<string>,
?Suffix: string,
?MultiSuffix: seq<string>,
?Values: seq<#seq<#IConvertible>>
) =
TableCells()
|> TableCells.style (
?Align = Align,
?MultiAlign = MultiAlign,
?Fill = Fill,
?Font = Font,
?Format = Format,
?Height = Height,
?Line = Line,
?Prefix = Prefix,
?MultiPrefix = MultiPrefix,
?Suffix = Suffix,
?MultiSuffix = MultiSuffix,
?Values = Values
)
//Applies the styles to TableCells()
static member style
(
?Align: StyleParam.HorizontalAlign,
?MultiAlign: seq<StyleParam.HorizontalAlign>,
?Fill: TableFill,
?Font: Font,
?Format: seq<string>,
?Height: int,
?Line: Line,
?Prefix: string,
?MultiPrefix: seq<string>,
?Suffix: string,
?MultiSuffix: seq<string>,
?Values: seq<#seq<#IConvertible>>
) =
fun (cells: TableCells) ->
cells
|> DynObj.withOptionalSingleOrMultiPropertyBy "align" (Align, MultiAlign) StyleParam.HorizontalAlign.convert
|> DynObj.withOptionalProperty "fill" Fill
|> DynObj.withOptionalProperty "font" Font
|> DynObj.withOptionalProperty "format" Format
|> DynObj.withOptionalProperty "height" Height
|> DynObj.withOptionalProperty "line" Line
|> DynObj.withOptionalSingleOrMultiProperty "prefix" (Prefix, MultiPrefix)
|> DynObj.withOptionalSingleOrMultiProperty "suffix" (Suffix, MultiSuffix)
|> DynObj.withOptionalProperty "values" Values
type TableHeader = TableCells