forked from plotly/Plotly.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPathbar.fs
More file actions
69 lines (63 loc) · 2.57 KB
/
Copy pathPathbar.fs
File metadata and controls
69 lines (63 loc) · 2.57 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
namespace Plotly.NET
open System
type Pathbar () =
inherit DynamicObj ()
///Initializes pathbar object (used in Chart.Treemap)
///
///Parameters:
///
///Visible : Determines if the path bar is drawn i.e. outside the trace `domain` and with one pixel gap.
///
///Side : Determines on which side of the the treemap the `pathbar` should be presented.
///
///EdgeShape: Determines which shape is used for edges between `pathbar` labels.
///
///Thickness: Sets the thickness of `pathbar` (in px). If not specified the `pathbar.textfont.size` is used with 3 pixles extra padding on each side.
///
///Textfont : Sets the font used inside `pathbar`.
static member init
(
?Visible :bool,
?Side :StyleParam.Side,
?EdgeShape :StyleParam.TreemapEdgeShape,
?Thickness :float,
?Textfont :Font
) =
Pathbar()
|> Pathbar.style
(
?Visible = Visible ,
?Side = Side ,
?EdgeShape = EdgeShape,
?Thickness = Thickness,
?Textfont = Textfont
)
///Applies the given styles to the given pathbar object
///
///Parameters:
///
///Visible : Determines if the path bar is drawn i.e. outside the trace `domain` and with one pixel gap.
///
///Side : Determines on which side of the the treemap the `pathbar` should be presented.
///
///EdgeShape: Determines which shape is used for edges between `pathbar` labels.
///
///Thickness: Sets the thickness of `pathbar` (in px). If not specified the `pathbar.textfont.size` is used with 3 pixles extra padding on each side.
///
///Textfont : Sets the font used inside `pathbar`.
static member style
(
?Visible :bool,
?Side :StyleParam.Side,
?EdgeShape :StyleParam.TreemapEdgeShape,
?Thickness :float,
?Textfont :Font
) =
(fun (pathbar:Pathbar) ->
Visible |> DynObj.setValueOpt pathbar "visible"
Side |> DynObj.setValueOptBy pathbar "side" StyleParam.Side.convert
EdgeShape |> DynObj.setValueOptBy pathbar "edgeshape" StyleParam.TreemapEdgeShape.convert
Thickness |> DynObj.setValueOpt pathbar "thickness"
Textfont |> DynObj.setValueOpt pathbar "textfont "
pathbar
)