Skip to content

Commit e904ed9

Browse files
committed
add new attributes introduced to hoverlabels, heatmap, histogram2d,histogram2dcontour, and contour
1 parent f51c611 commit e904ed9

File tree

2 files changed

+49
-7
lines changed

2 files changed

+49
-7
lines changed

src/Plotly.NET/Layout/ObjectAbstractions/Common/Hoverlabel.fs

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,63 @@ open DynamicObj
55
open System
66
open System.Runtime.InteropServices
77

8-
/// Hoverlabel type inherits from dynamic object
8+
/// Hoverlabels that appear while hovering over elements on charts
99
type Hoverlabel() =
1010
inherit DynamicObj()
1111

12-
/// Initialized Line object
12+
/// <summary>
13+
/// Returns a new Hoverlabel object with the given styles
14+
/// </summary>
15+
/// <param name="Align">Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines</param>
16+
/// <param name="BgColor">Sets the background color of all hover labels on graph</param>
17+
/// <param name="BorderColor">Sets the border color of all hover labels on graph.</param>
18+
/// <param name="Font">Sets the default hover label font used by all traces on the graph.</param>
19+
/// <param name="GroupTitleFont">Sets the font for group titles in hover (unified modes). Defaults to `hoverlabel.font`.</param>
20+
/// <param name="Namelength">Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer &gt;3 will show the whole name if it is less than that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis.</param>
1321
static member init
1422
(
23+
[<Optional; DefaultParameterValue(null)>] ?Align: StyleParam.Align,
1524
[<Optional; DefaultParameterValue(null)>] ?BgColor: Color,
1625
[<Optional; DefaultParameterValue(null)>] ?BorderColor: Color,
1726
[<Optional; DefaultParameterValue(null)>] ?Font: Font,
18-
[<Optional; DefaultParameterValue(null)>] ?Align: StyleParam.Align,
27+
[<Optional; DefaultParameterValue(null)>] ?GroupTitleFont: Font,
1928
[<Optional; DefaultParameterValue(null)>] ?Namelength: int
2029
) =
2130
Hoverlabel()
2231
|> Hoverlabel.style (
2332
?BgColor = BgColor,
2433
?BorderColor = BorderColor,
2534
?Font = Font,
35+
?GroupTitleFont = GroupTitleFont,
2636
?Align = Align,
2737
?Namelength = Namelength
2838
)
2939

3040

31-
// Applies the styles to Line()
41+
/// <summary>
42+
/// Returns a function that applies the given styles to a Legend object
43+
/// </summary>
44+
/// <param name="Align">Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines</param>
45+
/// <param name="BgColor">Sets the background color of all hover labels on graph</param>
46+
/// <param name="BorderColor">Sets the border color of all hover labels on graph.</param>
47+
/// <param name="Font">Sets the default hover label font used by all traces on the graph.</param>
48+
/// <param name="GroupTitleFont">Sets the font for group titles in hover (unified modes). Defaults to `hoverlabel.font`.</param>
49+
/// <param name="Namelength">Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer &gt;3 will show the whole name if it is less than that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis.</param>
3250
static member style
3351
(
3452
[<Optional; DefaultParameterValue(null)>] ?BgColor: Color,
3553
[<Optional; DefaultParameterValue(null)>] ?BorderColor: Color,
3654
[<Optional; DefaultParameterValue(null)>] ?Font: Font,
55+
[<Optional; DefaultParameterValue(null)>] ?GroupTitleFont: Font,
3756
[<Optional; DefaultParameterValue(null)>] ?Align: StyleParam.Align,
3857
[<Optional; DefaultParameterValue(null)>] ?Namelength: int
3958
) =
4059
(fun (label: Hoverlabel) ->
4160
BgColor |> DynObj.setValueOpt label "bgcolor"
4261
BorderColor |> DynObj.setValueOpt label "bordercolor"
4362
Font |> DynObj.setValueOpt label "font"
63+
GroupTitleFont |> DynObj.setValueOpt label "grouptitlefont"
4464
Align |> DynObj.setValueOptBy label "align" StyleParam.Align.convert
4565
Namelength |> DynObj.setValueOpt label "namelength"
4666

47-
// out ->
4867
label)

0 commit comments

Comments
 (0)