Skip to content

Commit 8ad20db

Browse files
committed
plotlyjs v2.17: Add marker.cornerradius attribute to treemap trace (plotly/plotly.js#6351)
1 parent 67378a3 commit 8ad20db

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

Diff for: src/Plotly.NET/ChartAPI/Chart.fs

+4-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ type Chart =
192192
/// <param name="Colors">Sets the color of each sector. If not specified, the default trace color set is used to pick the sector colors.</param>
193193
/// <param name="ColorAxis">Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", "coloraxis3", etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis.</param>
194194
/// <param name="ColorBar">Sets the marker's color bar.</param>
195-
/// <param name="Colorscale"></param>
195+
/// <param name="Colorscale">Sets the colorscale. Has an effect only if colors is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the colorscale in color space, use `marker.cmin` and `marker.cmax`. Alternatively, `colorscale` may be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.</param>
196+
/// <param name="CornerRadius">Sets the maximum rounding of corners (in px).</param>
196197
/// <param name="Gradient">Sets the marker's gradient</param>
197198
/// <param name="Outline">Sets the marker's outline.</param>
198199
/// <param name="Opacity">Sets the marker opacity.</param>
@@ -229,6 +230,7 @@ type Chart =
229230
[<Optional; DefaultParameterValue(null)>] ?ColorAxis: StyleParam.SubPlotId,
230231
[<Optional; DefaultParameterValue(null)>] ?ColorBar: ColorBar,
231232
[<Optional; DefaultParameterValue(null)>] ?Colorscale: StyleParam.Colorscale,
233+
[<Optional; DefaultParameterValue(null)>] ?CornerRadius: int,
232234
[<Optional; DefaultParameterValue(null)>] ?Gradient: Gradient,
233235
[<Optional; DefaultParameterValue(null)>] ?Outline: Line,
234236
[<Optional; DefaultParameterValue(null)>] ?MaxDisplayed: int,
@@ -267,6 +269,7 @@ type Chart =
267269
?ColorAxis = ColorAxis,
268270
?ColorBar = ColorBar,
269271
?Colorscale = Colorscale,
272+
?CornerRadius = CornerRadius,
270273
?Gradient = Gradient,
271274
?Outline = Outline,
272275
?Size = Size,

Diff for: src/Plotly.NET/RELEASE_NOTES.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
- Keep up with plotlyjs 2.x incremental updates:
66
- v2.17:
77
- [Add shift and autoshift to cartesian y axes to help avoid overlapping of multiple axes](https://github.com/plotly/Plotly.NET/commit/9f7edb8281ba87a2c122d99604af32d17efec168)
8+
- [Introduce group attributes for scatter trace i.e. alignmentgroup, offsetgroup, scattermode and scattergap]()
9+
- [Add marker.cornerradius attribute to treemap trace]()
810
- v2.16:
911
- [Add bounds to mapbox subplots](https://github.com/plotly/Plotly.NET/commit/046e3c472447c720ec7896f2109895028dba471c)
1012
- [Add clustering options to scattermapbox](https://github.com/plotly/Plotly.NET/commit/0ee67e3e9251515d94a2f40858ed4fdd7398e104)

Diff for: src/Plotly.NET/Traces/ObjectAbstractions/Marker.fs

+8-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ type Marker() =
2424
/// <param name="Colors">Sets the color of each sector. If not specified, the default trace color set is used to pick the sector colors.</param>
2525
/// <param name="ColorAxis">Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", "coloraxis3", etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis.</param>
2626
/// <param name="ColorBar">Sets the marker's color bar.</param>
27-
/// <param name="Colorscale"></param>
27+
/// <param name="Colorscale">Sets the colorscale. Has an effect only if colors is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the colorscale in color space, use `marker.cmin` and `marker.cmax`. Alternatively, `colorscale` may be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.</param>
28+
/// <param name="CornerRadius">Sets the maximum rounding of corners (in px).</param>
2829
/// <param name="Gradient">Sets the marker's gradient</param>
2930
/// <param name="Outline">Sets the marker's outline.</param>
3031
/// <param name="Opacity">Sets the marker opacity.</param>
@@ -60,6 +61,7 @@ type Marker() =
6061
[<Optional; DefaultParameterValue(null)>] ?ColorAxis: StyleParam.SubPlotId,
6162
[<Optional; DefaultParameterValue(null)>] ?ColorBar: ColorBar,
6263
[<Optional; DefaultParameterValue(null)>] ?Colorscale: StyleParam.Colorscale,
64+
[<Optional; DefaultParameterValue(null)>] ?CornerRadius: int,
6365
[<Optional; DefaultParameterValue(null)>] ?Gradient: Gradient,
6466
[<Optional; DefaultParameterValue(null)>] ?Outline: Line,
6567
[<Optional; DefaultParameterValue(null)>] ?MaxDisplayed: int,
@@ -96,6 +98,7 @@ type Marker() =
9698
?ColorAxis = ColorAxis,
9799
?ColorBar = ColorBar,
98100
?Colorscale = Colorscale,
101+
?CornerRadius = CornerRadius,
99102
?Gradient = Gradient,
100103
?Outline = Outline,
101104
?Size = Size,
@@ -133,7 +136,8 @@ type Marker() =
133136
/// <param name="Colors">Sets the color of each sector. If not specified, the default trace color set is used to pick the sector colors.</param>
134137
/// <param name="ColorAxis">Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", "coloraxis3", etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis.</param>
135138
/// <param name="ColorBar">Sets the marker's color bar.</param>
136-
/// <param name="Colorscale"></param>
139+
/// <param name="Colorscale">Sets the colorscale. Has an effect only if colors is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the bounds of the colorscale in color space, use `marker.cmin` and `marker.cmax`. Alternatively, `colorscale` may be a palette name string of the following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd.</param>
140+
/// <param name="CornerRadius">Sets the maximum rounding of corners (in px).</param>
137141
/// <param name="Gradient">Sets the marker's gradient</param>
138142
/// <param name="Outline">Sets the marker's outline.</param>
139143
/// <param name="Opacity">Sets the marker opacity.</param>
@@ -169,6 +173,7 @@ type Marker() =
169173
[<Optional; DefaultParameterValue(null)>] ?ColorAxis: StyleParam.SubPlotId,
170174
[<Optional; DefaultParameterValue(null)>] ?ColorBar: ColorBar,
171175
[<Optional; DefaultParameterValue(null)>] ?Colorscale: StyleParam.Colorscale,
176+
[<Optional; DefaultParameterValue(null)>] ?CornerRadius: int,
172177
[<Optional; DefaultParameterValue(null)>] ?Gradient: Gradient,
173178
[<Optional; DefaultParameterValue(null)>] ?Outline: Line,
174179
[<Optional; DefaultParameterValue(null)>] ?MaxDisplayed: int,
@@ -205,6 +210,7 @@ type Marker() =
205210
ColorAxis |> DynObj.setValueOptBy marker "coloraxis" StyleParam.SubPlotId.convert
206211
ColorBar |> DynObj.setValueOpt marker "colorbar"
207212
Colorscale |> DynObj.setValueOptBy marker "colorscale" StyleParam.Colorscale.convert
213+
CornerRadius |> DynObj.setValueOpt marker "cornerradius"
208214
Gradient |> DynObj.setValueOpt marker "gradient"
209215
Outline |> DynObj.setValueOpt marker "line"
210216
(Size, MultiSize) |> DynObj.setSingleOrMultiOpt marker "size"

Diff for: src/Plotly.NET/Traces/Trace.fs

+7-1
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ type TraceStyle() =
357357
[<Optional; DefaultParameterValue(null)>] ?ColorAxis: StyleParam.SubPlotId,
358358
[<Optional; DefaultParameterValue(null)>] ?ColorBar: ColorBar,
359359
[<Optional; DefaultParameterValue(null)>] ?Colorscale: StyleParam.Colorscale,
360+
[<Optional; DefaultParameterValue(null)>] ?CornerRadius: int,
360361
[<Optional; DefaultParameterValue(null)>] ?Gradient: Gradient,
361362
[<Optional; DefaultParameterValue(null)>] ?Outline: Line,
362363
[<Optional; DefaultParameterValue(null)>] ?MaxDisplayed: int,
@@ -384,6 +385,8 @@ type TraceStyle() =
384385
trace
385386
|> Trace.getMarker
386387
|> Marker.style (
388+
?Angle = Angle,
389+
?AngleRef = AngleRef,
387390
?AutoColorScale = AutoColorScale,
388391
?CAuto = CAuto,
389392
?CMax = CMax,
@@ -394,6 +397,7 @@ type TraceStyle() =
394397
?ColorAxis = ColorAxis,
395398
?ColorBar = ColorBar,
396399
?Colorscale = Colorscale,
400+
?CornerRadius = CornerRadius,
397401
?Gradient = Gradient,
398402
?Outline = Outline,
399403
?Size = Size,
@@ -412,7 +416,9 @@ type TraceStyle() =
412416
?ShowScale = ShowScale,
413417
?SizeMin = SizeMin,
414418
?SizeMode = SizeMode,
415-
?SizeRef = SizeRef
419+
?SizeRef = SizeRef,
420+
?StandOff = StandOff,
421+
?MultiStandOff = MultiStandOff
416422
)
417423

418424
trace |> Trace.setMarker (marker))

0 commit comments

Comments
 (0)