|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.Linq; |
| 4 | +using System.Text; |
| 5 | +using System.Threading.Tasks; |
| 6 | +using Plotly.NET; |
| 7 | +using Plotly.NET.LayoutObjects; |
| 8 | +using Plotly.NET.TraceObjects; |
| 9 | + |
| 10 | +namespace Plotly.NET.CSharp |
| 11 | +{ |
| 12 | + public static partial class Chart |
| 13 | + { |
| 14 | + /// <summary> |
| 15 | + /// Creates a Scatter3D plot. |
| 16 | + /// |
| 17 | + /// In general, Scatter3D Plots plot three-dimensional data on 3 cartesian position scales in the X, Y, and Z dimension. |
| 18 | + /// |
| 19 | + /// Scatter3D charts are the basis of Point3D, Line3D, and Bubble3D Charts, and can be customized as such. We also provide abstractions for those: Chart.Line3D, Chart.Point3D, Chart.Bubble3D |
| 20 | + /// </summary> |
| 21 | + /// <param name="x">Sets the x coordinates of the plotted data.</param> |
| 22 | + /// <param name="y">Sets the y coordinates of the plotted data.</param> |
| 23 | + /// <param name="z">Sets the z coordinates of the plotted data.</param> |
| 24 | + /// <param name="mode">Determines the drawing mode for this scatter trace.</param> |
| 25 | + /// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param> |
| 26 | + /// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param> |
| 27 | + /// <param name="Opacity">Sets the opactity of the trace</param> |
| 28 | + /// <param name="MultiOpacity">Sets the opactity of individual datum markers</param> |
| 29 | + /// <param name="Text">Sets a text associated with each datum</param> |
| 30 | + /// <param name="MultiText">Sets individual text for each datum</param> |
| 31 | + /// <param name="TextPosition">Sets the position of text associated with each datum</param> |
| 32 | + /// <param name="MultiTextPosition">Sets the position of text associated with individual datum</param> |
| 33 | + /// <param name="MarkerColor">Sets the color of the marker</param> |
| 34 | + /// <param name="MarkerColorScale">Sets the colorscale of the marker</param> |
| 35 | + /// <param name="MarkerOutline">Sets the outline of the marker</param> |
| 36 | + /// <param name="MarkerSymbol">Sets the marker symbol for each datum</param> |
| 37 | + /// <param name="MultiMarkerSymbol">Sets the marker symbol for each individual datum</param> |
| 38 | + /// <param name="Marker">Sets the marker (use this for more finegrained control than the other marker-associated arguments)</param> |
| 39 | + /// <param name="LineColor">Sets the color of the line</param> |
| 40 | + /// <param name="LineColorScale">Sets the colorscale of the line</param> |
| 41 | + /// <param name="LineWidth">Sets the width of the line</param> |
| 42 | + /// <param name="LineDash">sets the drawing style of the line</param> |
| 43 | + /// <param name="Line">Sets the line (use this for more finegrained control than the other line-associated arguments)</param> |
| 44 | + /// <param name="Projection">Sets the projection of this trace.</param> |
| 45 | + /// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param> |
| 46 | + public static GenericChart.GenericChart Scatter3D<XData, YData, ZData, TextData>( |
| 47 | + IEnumerable<XData> x, |
| 48 | + IEnumerable<YData> y, |
| 49 | + IEnumerable<ZData> z, |
| 50 | + StyleParam.Mode mode, |
| 51 | + string? Name = null, |
| 52 | + bool? ShowLegend = null, |
| 53 | + double? Opacity = null, |
| 54 | + IEnumerable<double>? MultiOpacity = null, |
| 55 | + TextData? Text = null, |
| 56 | + IEnumerable<TextData>? MultiText = null, |
| 57 | + StyleParam.TextPosition? TextPosition = null, |
| 58 | + IEnumerable<StyleParam.TextPosition>? MultiTextPosition = null, |
| 59 | + Color? MarkerColor = null, |
| 60 | + StyleParam.Colorscale? MarkerColorScale = null, |
| 61 | + Line? MarkerOutline = null, |
| 62 | + StyleParam.MarkerSymbol3D? MarkerSymbol = null, |
| 63 | + IEnumerable<StyleParam.MarkerSymbol3D>? MultiMarkerSymbol = null, |
| 64 | + Marker? Marker = null, |
| 65 | + Color? LineColor = null, |
| 66 | + StyleParam.Colorscale? LineColorScale = null, |
| 67 | + double? LineWidth = null, |
| 68 | + StyleParam.DrawingStyle? LineDash = null, |
| 69 | + Line? Line = null, |
| 70 | + Projection? Projection = null, |
| 71 | + bool? UseDefaults = null |
| 72 | + ) |
| 73 | + where XData: IConvertible |
| 74 | + where YData: IConvertible |
| 75 | + where ZData: IConvertible |
| 76 | + where TextData: class, IConvertible |
| 77 | + |
| 78 | + => Plotly.NET.Chart3D.Chart.Scatter3D<XData, YData, ZData, TextData>( |
| 79 | + x: x, |
| 80 | + y: y, |
| 81 | + z: z, |
| 82 | + mode: mode, |
| 83 | + Name: Helpers.ToOption(Name), |
| 84 | + ShowLegend: Helpers.ToOptionV(ShowLegend), |
| 85 | + Opacity: Helpers.ToOptionV(Opacity), |
| 86 | + MultiOpacity: Helpers.ToOption(MultiOpacity), |
| 87 | + Text: Helpers.ToOption(Text), |
| 88 | + MultiText: Helpers.ToOption(MultiText), |
| 89 | + TextPosition: Helpers.ToOption(TextPosition), |
| 90 | + MultiTextPosition: Helpers.ToOption(MultiTextPosition), |
| 91 | + MarkerColor: Helpers.ToOption(MarkerColor), |
| 92 | + MarkerColorScale: Helpers.ToOption(MarkerColorScale), |
| 93 | + MarkerOutline: Helpers.ToOption(MarkerOutline), |
| 94 | + MarkerSymbol: Helpers.ToOption(MarkerSymbol), |
| 95 | + MultiMarkerSymbol: Helpers.ToOption(MultiMarkerSymbol), |
| 96 | + Marker: Helpers.ToOption(Marker), |
| 97 | + LineColor: Helpers.ToOption(LineColor), |
| 98 | + LineColorScale: Helpers.ToOption(LineColorScale), |
| 99 | + LineWidth: Helpers.ToOptionV(LineWidth), |
| 100 | + LineDash: Helpers.ToOption(LineDash), |
| 101 | + Line: Helpers.ToOption(Line), |
| 102 | + Projection: Helpers.ToOption(Projection), |
| 103 | + UseDefaults: Helpers.ToOptionV(UseDefaults) |
| 104 | + ); |
| 105 | + } |
| 106 | +} |
0 commit comments