-
Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy pathFont.fs
More file actions
33 lines (27 loc) · 838 Bytes
/
Copy pathFont.fs
File metadata and controls
33 lines (27 loc) · 838 Bytes
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
namespace Plotly.NET
open System.Runtime.InteropServices
open DynamicObj
/// Font type inherits from dynamic object
type Font() =
inherit DynamicObj()
/// Init Font()
static member init
(
?Family: StyleParam.FontFamily,
?Size: float,
?Color: Color
) =
Font() |> Font.style (?Family = Family, ?Size = Size, ?Color = Color)
// Applies the styles to Font()
static member style
(
?Family: StyleParam.FontFamily,
?Size: float,
?Color: Color
) =
(fun (font: Font) ->
font
|> DynObj.withOptionalPropertyBy "family" Family StyleParam.FontFamily.toString
|> DynObj.withOptionalProperty "size" Size
|> DynObj.withOptionalProperty "color" Color
)