Skip to content

Commit efde9d8

Browse files
committed
Add fslab template
1 parent bd6f120 commit efde9d8

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

Diff for: src/Plotly.NET/Template.fs

+38-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ type Template() =
5252

5353
module ChartTemplates =
5454

55+
/// A colorway is an array of colors that contains the default colors for traces
5556
module ColorWays =
5657

5758
let plotly = [|
@@ -67,6 +68,19 @@ module ChartTemplates =
6768
"#FECB52"
6869
|]
6970

71+
let fslab = [|
72+
"#A00975" // darkmagenta
73+
"#F99BDE" // lightmagenta
74+
"#D12F67" // rose
75+
"#ff9b9b" // light rose
76+
"#d59a1b" // dark yellow
77+
"#d2c572" // yellow
78+
"#44d57f" // green
79+
"#c6ffdd" // light green
80+
"#438AFE" // aquamarine
81+
"#00d4ff" // light aquamarine
82+
|]
83+
7084
let light =
7185

7286
let defaultFont = Font.init (Size = 40)
@@ -116,4 +130,27 @@ module ChartTemplates =
116130
|> DynObj.setValueOpt l "yaxis"
117131

118132
l
119-
)
133+
)
134+
135+
let fslab =
136+
137+
let initFslabAxisTemplate() =
138+
Axis.LinearAxis.init(
139+
Linecolor = "#438AFE",
140+
Zerolinecolor = "rgba(67, 138, 254, 0.5)",
141+
Gridcolor = "rgba(67, 138, 254, 0.5)",
142+
Tickcolor = "rgba(67, 138, 254, 0.5)",
143+
Showline= true,
144+
Zeroline=true
145+
)
146+
147+
let fslabLayoutTemplate =
148+
Layout.init(
149+
Paper_bgcolor = "#2D3E50",
150+
Plot_bgcolor= "#2D3E50",
151+
Font = Font.init(Color = "#438AFE")
152+
)
153+
|> Layout.AddLinearAxis((StyleParam.AxisId.X 1),(initFslabAxisTemplate()))
154+
|> Layout.AddLinearAxis((StyleParam.AxisId.Y 1),(initFslabAxisTemplate()))
155+
156+
Template.init(fslabLayoutTemplate)

0 commit comments

Comments
 (0)