Skip to content

Commit 6711ecf

Browse files
committed
plotlyjs v2.12.0: add griddash axis property to cartesian, polar, smith, ternary and geo subplots and add griddash and minorgriddash to carpet trace (plotly/plotly.js#6144), adapt StyleParam.DrawingStyle accordingly
1 parent d183457 commit 6711ecf

File tree

10 files changed

+116
-9
lines changed

10 files changed

+116
-9
lines changed

src/Plotly.NET/CSharpLayer/GenericChartExtensions.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ module GenericChartExtensions =
965965
let append =
966966
Option.defaultValue true AppendTags
967967

968-
this |> Chart.withMathTex (AppendTags = append)
968+
this |> Chart.withMathTex (AppendTags = append, ?MathJaxVersion = MathJaxVersion)
969969

970970

971971
/// Save chart as html single page

src/Plotly.NET/ChartAPI/Chart.fs

+6
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,7 @@ type Chart =
10801080
/// <param name="LineColor">Sets the axis line color.</param>
10811081
/// <param name="ShowGrid">Determines whether or not grid lines are drawn. If "true", the grid lines are drawn at every tick mark.</param>
10821082
/// <param name="GridColor">Sets the color of the grid lines.</param>
1083+
/// <param name="GridDash">Sets the dash style of lines. Set to a dash type string ("solid", "dot", "dash", "longdash", "dashdot", or "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px").</param>
10831084
/// <param name="ZeroLine">Determines whether or not a line is drawn at along the 0 value of this axis. If "true", the zero line is drawn on top of the grid lines.</param>
10841085
/// <param name="ZeroLineColor">Sets the line color of the zero line.</param>
10851086
/// <param name="Anchor">If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to the corresponding opposite-letter axis. If set to "free", this axis' position is determined by `position`.</param>
@@ -1112,6 +1113,7 @@ type Chart =
11121113
[<Optional; DefaultParameterValue(null)>] ?LineColor: Color,
11131114
[<Optional; DefaultParameterValue(null)>] ?ShowGrid: bool,
11141115
[<Optional; DefaultParameterValue(null)>] ?GridColor: Color,
1116+
[<Optional; DefaultParameterValue(null)>] ?GridDash: StyleParam.DrawingStyle,
11151117
[<Optional; DefaultParameterValue(null)>] ?ZeroLine: bool,
11161118
[<Optional; DefaultParameterValue(null)>] ?ZeroLineColor: Color,
11171119
[<Optional; DefaultParameterValue(null)>] ?Anchor: StyleParam.LinearAxisId,
@@ -1153,6 +1155,7 @@ type Chart =
11531155
?LineColor = LineColor,
11541156
?ShowGrid = ShowGrid,
11551157
?GridColor = GridColor,
1158+
?GridDash = GridDash,
11561159
?ZeroLine = ZeroLine,
11571160
?ZeroLineColor = ZeroLineColor,
11581161
?Anchor = Anchor,
@@ -1218,6 +1221,7 @@ type Chart =
12181221
/// <param name="LineColor">Sets the axis line color.</param>
12191222
/// <param name="ShowGrid">Determines whether or not grid lines are drawn. If "true", the grid lines are drawn at every tick mark.</param>
12201223
/// <param name="GridColor">Sets the color of the grid lines.</param>
1224+
/// <param name="GridDash">Sets the dash style of lines. Set to a dash type string ("solid", "dot", "dash", "longdash", "dashdot", or "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px").</param>
12211225
/// <param name="ZeroLine">Determines whether or not a line is drawn at along the 0 value of this axis. If "true", the zero line is drawn on top of the grid lines.</param>
12221226
/// <param name="ZeroLineColor">Sets the line color of the zero line.</param>
12231227
/// <param name="Anchor">If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to the corresponding opposite-letter axis. If set to "free", this axis' position is determined by `position`.</param>
@@ -1250,6 +1254,7 @@ type Chart =
12501254
[<Optional; DefaultParameterValue(null)>] ?LineColor: Color,
12511255
[<Optional; DefaultParameterValue(null)>] ?ShowGrid: bool,
12521256
[<Optional; DefaultParameterValue(null)>] ?GridColor: Color,
1257+
[<Optional; DefaultParameterValue(null)>] ?GridDash: StyleParam.DrawingStyle,
12531258
[<Optional; DefaultParameterValue(null)>] ?ZeroLine: bool,
12541259
[<Optional; DefaultParameterValue(null)>] ?ZeroLineColor: Color,
12551260
[<Optional; DefaultParameterValue(null)>] ?Anchor: StyleParam.LinearAxisId,
@@ -1291,6 +1296,7 @@ type Chart =
12911296
?LineColor = LineColor,
12921297
?ShowGrid = ShowGrid,
12931298
?GridColor = GridColor,
1299+
?GridDash = GridDash,
12941300
?ZeroLine = ZeroLine,
12951301
?ZeroLineColor = ZeroLineColor,
12961302
?Anchor = Anchor,

src/Plotly.NET/ChartAPI/GenericChart.fs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module HTML =
1515
<head>
1616
<!-- Plotly.js -->
1717
<meta http-equiv="X-UA-Compatible" content="IE=11" >
18-
<script src="https://cdn.plot.ly/plotly-2.11.1.min.js"></script>
18+
<script src="https://cdn.plot.ly/plotly-2.12.1.min.js"></script>
1919
[ADDITIONAL_HEAD_TAGS]
2020
<style>
2121
.container {
@@ -58,7 +58,7 @@ module HTML =
5858
newScript.AppendLine(
5959
@"
6060
var renderPlotly_[SCRIPTID] = function() {
61-
var fsharpPlotlyRequire = requirejs.config({context:'fsharp-plotly',paths:{plotly:'https://cdn.plot.ly/plotly-2.11.1.min'}}) || require;
61+
var fsharpPlotlyRequire = requirejs.config({context:'fsharp-plotly',paths:{plotly:'https://cdn.plot.ly/plotly-2.12.1.min'}}) || require;
6262
fsharpPlotlyRequire(['plotly'], function(Plotly) {"
6363
)
6464
|> ignore

src/Plotly.NET/CommonAbstractions/StyleParams.fs

+6-2
Original file line numberDiff line numberDiff line change
@@ -973,14 +973,18 @@ module StyleParam =
973973
| Dash
974974
| Dot
975975
| DashDot
976-
| User of int
976+
| LongDash
977+
| LongDashDot
978+
| User of seq<int>
977979
static member toString =
978980
function
979981
| Solid -> "solid"
980982
| Dash -> "dash"
981983
| Dot -> "dot"
982984
| DashDot -> "dashdot"
983-
| User px -> px.ToString()
985+
| LongDash -> "longdash"
986+
| LongDashDot -> "longdashdot"
987+
| User px -> px |> Seq.map (fun px -> $"{px}px") |> String.concat ","
984988

985989
static member convert = DrawingStyle.toString >> box
986990
override this.ToString() = this |> DrawingStyle.toString

0 commit comments

Comments
 (0)