|
6 | 6 | using Plotly.NET; |
7 | 7 | using Plotly.NET.LayoutObjects; |
8 | 8 | using Plotly.NET.TraceObjects; |
| 9 | +using System.Runtime.InteropServices; |
| 10 | + |
9 | 11 |
|
10 | 12 | namespace Plotly.NET.CSharp |
11 | 13 | { |
@@ -43,64 +45,64 @@ public static partial class Chart |
43 | 45 | /// <param name="Line">Sets the line (use this for more finegrained control than the other line-associated arguments)</param> |
44 | 46 | /// <param name="Projection">Sets the projection of this trace.</param> |
45 | 47 | /// <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, |
| 48 | + public static GenericChart.GenericChart Scatter3D<XType, YType, ZType, TextType>( |
| 49 | + IEnumerable<XType> x, |
| 50 | + IEnumerable<YType> y, |
| 51 | + IEnumerable<ZType> z, |
50 | 52 | 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 |
| 53 | + [Optional] string? Name, |
| 54 | + [Optional] bool? ShowLegend, |
| 55 | + [Optional] double? Opacity, |
| 56 | + [Optional] IEnumerable<double>? MultiOpacity, |
| 57 | + [Optional] TextType? Text, |
| 58 | + [Optional] IEnumerable<TextType>? MultiText, |
| 59 | + [Optional] StyleParam.TextPosition? TextPosition, |
| 60 | + [Optional] IEnumerable<StyleParam.TextPosition>? MultiTextPosition, |
| 61 | + [Optional] Color? MarkerColor, |
| 62 | + [Optional] StyleParam.Colorscale? MarkerColorScale, |
| 63 | + [Optional] Line? MarkerOutline, |
| 64 | + [Optional] StyleParam.MarkerSymbol3D? MarkerSymbol, |
| 65 | + [Optional] IEnumerable<StyleParam.MarkerSymbol3D>? MultiMarkerSymbol, |
| 66 | + [Optional] Marker? Marker, |
| 67 | + [Optional] Color? LineColor, |
| 68 | + [Optional] StyleParam.Colorscale? LineColorScale, |
| 69 | + [Optional] double? LineWidth, |
| 70 | + [Optional] StyleParam.DrawingStyle? LineDash, |
| 71 | + [Optional] Line? Line, |
| 72 | + [Optional] Projection? Projection, |
| 73 | + [Optional] bool? UseDefaults |
72 | 74 | ) |
73 | | - where XData: IConvertible |
74 | | - where YData: IConvertible |
75 | | - where ZData: IConvertible |
76 | | - where TextData: class, IConvertible |
| 75 | + where XType: IConvertible |
| 76 | + where YType: IConvertible |
| 77 | + where ZType : IConvertible |
| 78 | + where TextType : IConvertible |
77 | 79 |
|
78 | | - => Plotly.NET.Chart3D.Chart.Scatter3D<XData, YData, ZData, TextData>( |
| 80 | + => Plotly.NET.Chart3D.Chart.Scatter3D<XType, YType, ZType, TextType>( |
79 | 81 | x: x, |
80 | 82 | y: y, |
81 | 83 | z: z, |
82 | 84 | 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) |
| 85 | + Name: Name.ToOption(), |
| 86 | + ShowLegend: ShowLegend.ToOptionV(), |
| 87 | + Opacity: Opacity.ToOptionV(), |
| 88 | + MultiOpacity: MultiOpacity.ToOption(), |
| 89 | + Text: Text.ToOption(), |
| 90 | + MultiText: MultiText.ToOption(), |
| 91 | + TextPosition: TextPosition.ToOption(), |
| 92 | + MultiTextPosition: MultiTextPosition.ToOption(), |
| 93 | + MarkerColor: MarkerColor.ToOption(), |
| 94 | + MarkerColorScale: MarkerColorScale.ToOption(), |
| 95 | + MarkerOutline: MarkerOutline.ToOption(), |
| 96 | + MarkerSymbol: MarkerSymbol.ToOption(), |
| 97 | + MultiMarkerSymbol: MultiMarkerSymbol.ToOption(), |
| 98 | + Marker: Marker.ToOption(), |
| 99 | + LineColor: LineColor.ToOption(), |
| 100 | + LineColorScale: LineColorScale.ToOption(), |
| 101 | + LineWidth: LineWidth.ToOptionV(), |
| 102 | + LineDash: LineDash.ToOption(), |
| 103 | + Line: Line.ToOption(), |
| 104 | + Projection: Projection.ToOption(), |
| 105 | + UseDefaults: UseDefaults.ToOptionV() |
104 | 106 | ); |
105 | 107 | } |
106 | 108 | } |
0 commit comments