Skip to content

Commit e1266d7

Browse files
authored
Merge pull request #213 from amakhno/add-color-to-mesh3d
2 parents 40c9e07 + 071d784 commit e1266d7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Plotly.NET/ChartAPI/Chart3D.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ module Chart3D =
295295
[<Optional;DefaultParameterValue(null)>] ?Name,
296296
[<Optional;DefaultParameterValue(null)>] ?ShowLegend,
297297
[<Optional;DefaultParameterValue(null)>] ?Opacity,
298+
[<Optional;DefaultParameterValue(null)>] ?Color,
298299
[<Optional;DefaultParameterValue(null)>] ?Contours,
299300
[<Optional;DefaultParameterValue(null)>] ?ColorScale,
300301
[<Optional;DefaultParameterValue(null)>] ?ShowScale,
@@ -307,7 +308,8 @@ module Chart3D =
307308
Z = z,
308309
?I = I,
309310
?J = J,
310-
?K = K
311+
?K = K,
312+
?Color = Color
311313
)
312314
)
313315
|> TraceStyle.TraceInfo(?Name=Name,?ShowLegend=ShowLegend,?Opacity=Opacity)

src/Plotly.NET/Traces/Trace3D.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ type Trace3DStyle() =
372372
/// <param name="Meta">Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To access the trace `meta` values in an attribute in the same trace, simply use `%{meta[i]}` where `i` is the index or key of the `meta` item in question. To access trace `meta` in layout attributes, use `%{data[n[.meta[i]}` where `i` is the index or key of the `meta` and `n` is the trace index.</param>
373373
/// <param name="CustomData">Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, "scatter" traces also appends customdata items in the markers DOM elements</param>
374374
/// <param name="Scene">Sets a reference between this trace's 3D coordinate system and a 3D scene. If "scene" (the default value), the (x,y,z) coordinates refer to `layout.scene`. If "scene2", the (x,y,z) coordinates refer to `layout.scene2`, and so on.</param>
375+
/// <param name="Color">Sets the color values, used for setting a color scale independent of `z`.</param>
375376
/// <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>
376377
/// <param name="ColorBar">Sets the colorbar of this trace.</param>
377378
/// <param name="AutoColorScale">Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `colorscale`. In case `colorscale` is unspecified or `autocolorscale` is true, the default palette will be chosen according to whether numbers in the `color` array are all positive, all negative or mixed.</param>
@@ -423,6 +424,7 @@ type Trace3DStyle() =
423424
[<Optional;DefaultParameterValue(null)>] ?Meta : string,
424425
[<Optional;DefaultParameterValue(null)>] ?CustomData : seq<#IConvertible>,
425426
[<Optional;DefaultParameterValue(null)>] ?Scene : StyleParam.SubPlotId,
427+
[<Optional;DefaultParameterValue(null)>] ?Color : Color,
426428
[<Optional;DefaultParameterValue(null)>] ?ColorAxis : StyleParam.SubPlotId,
427429
[<Optional;DefaultParameterValue(null)>] ?ColorBar : ColorBar,
428430
[<Optional;DefaultParameterValue(null)>] ?AutoColorScale : bool,
@@ -476,6 +478,7 @@ type Trace3DStyle() =
476478
Meta |> DynObj.setValueOpt mesh3d "meta"
477479
CustomData |> DynObj.setValueOpt mesh3d "customdata"
478480
Scene |> DynObj.setValueOptBy mesh3d "scene" StyleParam.SubPlotId.convert
481+
Color |> DynObj.setValueOpt mesh3d "color"
479482
ColorAxis |> DynObj.setValueOptBy mesh3d "coloraxis" StyleParam.SubPlotId.convert
480483
ColorBar |> DynObj.setValueOpt mesh3d "colorbar"
481484
AutoColorScale |> DynObj.setValueOpt mesh3d "autocolorscale"

0 commit comments

Comments
 (0)