Skip to content

Commit 5101dc5

Browse files
committed
plotlyjs v2.9.0: add ticklabelstep attribute to axes and colorbars (plotly/plotly.js#6088)
1 parent e904ed9 commit 5101dc5

File tree

6 files changed

+108
-25
lines changed

6 files changed

+108
-25
lines changed

src/Plotly.NET/ChartAPI/GenericChart.fs

Lines changed: 2 additions & 2 deletions
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.8.3.min.js"></script>
18+
<script src="https://cdn.plot.ly/plotly-2.9.0.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.8.3.min'}}) || require;
61+
var fsharpPlotlyRequire = requirejs.config({context:'fsharp-plotly',paths:{plotly:'https://cdn.plot.ly/plotly-2.9.0.min'}}) || require;
6262
fsharpPlotlyRequire(['plotly'], function(Plotly) {"
6363
)
6464
|> ignore

src/Plotly.NET/CommonAbstractions/ColorBar.fs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type ColorBar() =
3838
/// <param name="TickFormatStops">Set rules for customizing TickFormat on different zoom levels</param>
3939
/// <param name="TickLabelOverflow">Determines how we handle tick labels that would overflow either the graph div or the domain of the axis. The default value for inside tick labels is "hide past domain". In other cases the default is "hide past div".</param>
4040
/// <param name="TickLabelPosition">Determines where tick labels are drawn.</param>
41-
/// <param name="TickLen">Sets the tick length (in px).</param>
41+
/// <param name="TickLabelStep">Sets the spacing between tick labels as compared to the spacing between ticks. A value of 1 (default) means each tick gets a label. A value of 2 means shows every 2nd label. A larger value n means only every nth tick is labeled. `tick0` determines which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array".</param> /// <param name="TickLen">Sets the tick length (in px).</param>
4242
/// <param name="TickMode">Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided).</param>
4343
/// <param name="TickPrefix">Sets a tick label prefix.</param>
4444
/// <param name="Ticks">Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines.</param>
@@ -82,6 +82,7 @@ type ColorBar() =
8282
[<Optional; DefaultParameterValue(null)>] ?TickFormatStops: seq<TickFormatStop>,
8383
[<Optional; DefaultParameterValue(null)>] ?TickLabelOverflow: StyleParam.TickLabelOverflow,
8484
[<Optional; DefaultParameterValue(null)>] ?TickLabelPosition: StyleParam.TickLabelPosition,
85+
[<Optional; DefaultParameterValue(null)>] ?TickLabelStep: int,
8586
[<Optional; DefaultParameterValue(null)>] ?TickLen: float,
8687
[<Optional; DefaultParameterValue(null)>] ?TickMode: StyleParam.TickMode,
8788
[<Optional; DefaultParameterValue(null)>] ?TickPrefix: string,
@@ -127,6 +128,7 @@ type ColorBar() =
127128
?TickFormatStops = TickFormatStops,
128129
?TickLabelOverflow = TickLabelOverflow,
129130
?TickLabelPosition = TickLabelPosition,
131+
?TickLabelStep = TickLabelStep,
130132
?TickLen = TickLen,
131133
?TickMode = TickMode,
132134
?TickPrefix = TickPrefix,
@@ -174,7 +176,7 @@ type ColorBar() =
174176
/// <param name="TickFormatStops">Set rules for customizing TickFormat on different zoom levels</param>
175177
/// <param name="TickLabelOverflow">Determines how we handle tick labels that would overflow either the graph div or the domain of the axis. The default value for inside tick labels is "hide past domain". In other cases the default is "hide past div".</param>
176178
/// <param name="TickLabelPosition">Determines where tick labels are drawn relative to the ticks. Left and right options are used when `orientation` is *h*, top and bottom when `orientation` is *v*.</param>
177-
/// <param name="TickLen">Sets the tick length (in px).</param>
179+
/// <param name="TickLabelStep">Sets the spacing between tick labels as compared to the spacing between ticks. A value of 1 (default) means each tick gets a label. A value of 2 means shows every 2nd label. A larger value n means only every nth tick is labeled. `tick0` determines which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array".</param>/// <param name="TickLen">Sets the tick length (in px).</param>
178180
/// <param name="TickMode">Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`. If "linear", the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided). If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. ("array" is the default value if `tickvals` is provided).</param>
179181
/// <param name="TickPrefix">Sets a tick label prefix.</param>
180182
/// <param name="Ticks">Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn. If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines.</param>
@@ -218,6 +220,7 @@ type ColorBar() =
218220
[<Optional; DefaultParameterValue(null)>] ?TickFormatStops: seq<TickFormatStop>,
219221
[<Optional; DefaultParameterValue(null)>] ?TickLabelOverflow: StyleParam.TickLabelOverflow,
220222
[<Optional; DefaultParameterValue(null)>] ?TickLabelPosition: StyleParam.TickLabelPosition,
223+
[<Optional; DefaultParameterValue(null)>] ?TickLabelStep: int,
221224
[<Optional; DefaultParameterValue(null)>] ?TickLen: float,
222225
[<Optional; DefaultParameterValue(null)>] ?TickMode: StyleParam.TickMode,
223226
[<Optional; DefaultParameterValue(null)>] ?TickPrefix: string,
@@ -264,6 +267,7 @@ type ColorBar() =
264267
TickFormatStops |> DynObj.setValueOpt colorBar "tickformatstops"
265268
TickLabelOverflow |> DynObj.setValueOptBy colorBar "ticklabeloverflow" StyleParam.TickLabelOverflow.convert
266269
TickLabelPosition |> DynObj.setValueOptBy colorBar "ticklabelposition" StyleParam.TickLabelPosition.convert
270+
TickLabelStep |> DynObj.setValueOpt colorBar "ticklabelstep"
267271
TickLen |> DynObj.setValueOpt colorBar "ticklen"
268272
TickMode |> DynObj.setValueOptBy colorBar "tickmode" StyleParam.TickMode.convert
269273
TickPrefix |> DynObj.setValueOpt colorBar "tickprefix"

0 commit comments

Comments
 (0)