-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathPathbar.fs
More file actions
71 lines (65 loc) · 2.48 KB
/
Pathbar.fs
File metadata and controls
71 lines (65 loc) · 2.48 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
namespace Plotly.NET.TraceObjects
open Plotly.NET
open Plotly.NET.LayoutObjects
open DynamicObj
open System
open System.Runtime.InteropServices
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.PathbarEdgeShape,
?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.PathbarEdgeShape,
?Thickness: float,
?Textfont: Font
) =
fun (pathbar: Pathbar) ->
pathbar
|> DynObj.withOptionalProperty "visible" Visible
|> DynObj.withOptionalPropertyBy "side" Side StyleParam.Side.convert
|> DynObj.withOptionalPropertyBy "edgeshape" EdgeShape StyleParam.PathbarEdgeShape.convert
|> DynObj.withOptionalProperty "thickness" Thickness
|> DynObj.withOptionalProperty "textfont" Textfont