Skip to content

Commit f0e19d5

Browse files
committed
Finish trace object bindings (codegen with some curation)
1 parent c255859 commit f0e19d5

31 files changed

+683
-783
lines changed

src/Plotly.NET.CSharp/ObjectAbstractions/TraceObjects/Bins.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@ namespace Plotly.NET.CSharp;
1010

1111
public static partial class TraceObjects
1212
{
13-
public static Plotly.NET.TraceObjects.Bins Bins
13+
public static Plotly.NET.TraceObjects.Bins InitBins
1414
(
15-
1615
Optional<double> Start = default,
1716
Optional<double> End = default,
1817
Optional<double> Size = default
19-
) =>
20-
Plotly.NET.TraceObjects.Bins.init(
21-
22-
Start: Start.ToOption(),
23-
End: End.ToOption(),
24-
Size: Size.ToOption()
25-
);
18+
)
19+
=>
20+
Plotly.NET.TraceObjects.Bins.init(
21+
Start: Start.ToOption(),
22+
End: End.ToOption(),
23+
Size: Size.ToOption()
24+
);
2625
}
2726

src/Plotly.NET.CSharp/ObjectAbstractions/TraceObjects/Box.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,21 @@ namespace Plotly.NET.CSharp;
1010

1111
public static partial class TraceObjects
1212
{
13-
public static Plotly.NET.TraceObjects.Box Box
13+
public static Plotly.NET.TraceObjects.Box InitBox
1414
(
15-
1615
Optional<bool> Visible = default,
1716
Optional<double> Width = default,
1817
Optional<Color> FillColor = default,
1918
Optional<Color> LineColor = default,
2019
Optional<double> LineWidth = default
21-
) =>
22-
Plotly.NET.TraceObjects.Box.init(
23-
24-
Visible: Visible.ToOption(),
25-
Width: Width.ToOption(),
26-
FillColor: FillColor.ToOption(),
27-
LineColor: LineColor.ToOption(),
28-
LineWidth: LineWidth.ToOption()
29-
);
20+
)
21+
=>
22+
Plotly.NET.TraceObjects.Box.init(
23+
Visible: Visible.ToOption(),
24+
Width: Width.ToOption(),
25+
FillColor: FillColor.ToOption(),
26+
LineColor: LineColor.ToOption(),
27+
LineWidth: LineWidth.ToOption()
28+
);
3029
}
3130

src/Plotly.NET.CSharp/ObjectAbstractions/TraceObjects/Caps.cs

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,30 @@ namespace Plotly.NET.CSharp;
1010

1111
public static partial class TraceObjects
1212
{
13-
public static Plotly.NET.TraceObjects.CapFill CapFill
13+
public static Plotly.NET.TraceObjects.CapFill InitCapFill
1414
(
15-
1615
Optional<double> Fill = default,
1716
Optional<bool> Show = default
18-
) =>
19-
Plotly.NET.TraceObjects.CapFill.init(
17+
)
18+
=>
19+
Plotly.NET.TraceObjects.CapFill.init(
2020

21-
Fill: Fill.ToOption(),
22-
Show: Show.ToOption()
23-
);
24-
}
21+
Fill: Fill.ToOption(),
22+
Show: Show.ToOption()
23+
);
2524

26-
public static partial class TraceObjects
27-
{
28-
public static Plotly.NET.TraceObjects.Caps Caps
25+
public static Plotly.NET.TraceObjects.Caps InitCaps
2926
(
30-
3127
Optional<Plotly.NET.TraceObjects.CapFill> X = default,
3228
Optional<Plotly.NET.TraceObjects.CapFill> Y = default,
3329
Optional<Plotly.NET.TraceObjects.CapFill> Z = default
34-
) =>
35-
Plotly.NET.TraceObjects.Caps.init(
36-
37-
X: X.ToOption(),
38-
Y: Y.ToOption(),
39-
Z: Z.ToOption()
40-
);
30+
)
31+
=>
32+
Plotly.NET.TraceObjects.Caps.init(
33+
34+
X: X.ToOption(),
35+
Y: Y.ToOption(),
36+
Z: Z.ToOption()
37+
);
4138
}
4239

src/Plotly.NET.CSharp/ObjectAbstractions/TraceObjects/Contours.cs

Lines changed: 36 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,24 @@ namespace Plotly.NET.CSharp;
1010

1111
public static partial class TraceObjects
1212
{
13-
public static Plotly.NET.TraceObjects.ContourProject ContourProject
13+
public static Plotly.NET.TraceObjects.ContourProject InitContourProject
1414
(
1515

1616
Optional<bool> X = default,
1717
Optional<bool> Y = default,
1818
Optional<bool> Z = default
19-
) =>
19+
)
20+
21+
=>
2022
Plotly.NET.TraceObjects.ContourProject.init(
2123

2224
X: X.ToOption(),
2325
Y: Y.ToOption(),
2426
Z: Z.ToOption()
2527
);
26-
}
2728

28-
public static partial class TraceObjects
29-
{
30-
public static Plotly.NET.TraceObjects.Contour Contour
29+
public static Plotly.NET.TraceObjects.Contour InitContour
3130
(
32-
3331
Optional<Color> Color = default,
3432
Optional<double> End = default,
3533
Optional<bool> Highlight = default,
@@ -41,28 +39,24 @@ public static Plotly.NET.TraceObjects.Contour Contour
4139
Optional<double> Start = default,
4240
Optional<bool> UseColorMap = default,
4341
Optional<double> Width = default
44-
) =>
45-
Plotly.NET.TraceObjects.Contour.init(
46-
47-
Color: Color.ToOption(),
48-
End: End.ToOption(),
49-
Highlight: Highlight.ToOption(),
50-
HighlightColor: HighlightColor.ToOption(),
51-
HighlightWidth: HighlightWidth.ToOption(),
52-
Project: Project.ToOption(),
53-
Show: Show.ToOption(),
54-
Size: Size.ToOption(),
55-
Start: Start.ToOption(),
56-
UseColorMap: UseColorMap.ToOption(),
57-
Width: Width.ToOption()
58-
);
59-
}
42+
)
43+
=>
44+
Plotly.NET.TraceObjects.Contour.init(
45+
Color: Color.ToOption(),
46+
End: End.ToOption(),
47+
Highlight: Highlight.ToOption(),
48+
HighlightColor: HighlightColor.ToOption(),
49+
HighlightWidth: HighlightWidth.ToOption(),
50+
Project: Project.ToOption(),
51+
Show: Show.ToOption(),
52+
Size: Size.ToOption(),
53+
Start: Start.ToOption(),
54+
UseColorMap: UseColorMap.ToOption(),
55+
Width: Width.ToOption()
56+
);
6057

61-
public static partial class TraceObjects
62-
{
63-
public static Plotly.NET.TraceObjects.Contours Contours<ValueType>
58+
public static Plotly.NET.TraceObjects.Contours InitContours<ValueType>
6459
(
65-
6660
Optional<StyleParam.ContourColoring> Coloring = default,
6761
Optional<double> End = default,
6862
Optional<Font> LabelFont = default,
@@ -75,21 +69,20 @@ public static Plotly.NET.TraceObjects.Contours Contours<ValueType>
7569
Optional<StyleParam.ContourType> Type = default,
7670
Optional<ValueType> Value = default
7771
)
78-
where ValueType : IConvertible
79-
=>
80-
Plotly.NET.TraceObjects.Contours.init(
81-
82-
Coloring: Coloring.ToOption(),
83-
End: End.ToOption(),
84-
LabelFont: LabelFont.ToOption(),
85-
LabelFormat: LabelFormat.ToOption(),
86-
Operation: Operation.ToOption(),
87-
ShowLabels: ShowLabels.ToOption(),
88-
ShowLines: ShowLines.ToOption(),
89-
Size: Size.ToOption(),
90-
Start: Start.ToOption(),
91-
Type: Type.ToOption(),
92-
Value: Value.ToOption()
93-
);
72+
where ValueType: IConvertible
73+
=>
74+
Plotly.NET.TraceObjects.Contours.init(
75+
Coloring: Coloring.ToOption(),
76+
End: End.ToOption(),
77+
LabelFont: LabelFont.ToOption(),
78+
LabelFormat: LabelFormat.ToOption(),
79+
Operation: Operation.ToOption(),
80+
ShowLabels: ShowLabels.ToOption(),
81+
ShowLines: ShowLines.ToOption(),
82+
Size: Size.ToOption(),
83+
Start: Start.ToOption(),
84+
Type: Type.ToOption(),
85+
Value: Value.ToOption()
86+
);
9487
}
9588

src/Plotly.NET.CSharp/ObjectAbstractions/TraceObjects/Cumulative.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@ namespace Plotly.NET.CSharp;
1010

1111
public static partial class TraceObjects
1212
{
13-
public static Plotly.NET.TraceObjects.Cumulative Cumulative
13+
public static Plotly.NET.TraceObjects.Cumulative InitCumulative
1414
(
15-
1615
Optional<bool> Enabled = default,
1716
Optional<StyleParam.CumulativeDirection> Direction = default,
1817
Optional<StyleParam.Currentbin> Currentbin = default
19-
) =>
20-
Plotly.NET.TraceObjects.Cumulative.init(
21-
22-
Enabled: Enabled.ToOption(),
23-
Direction: Direction.ToOption(),
24-
Currentbin: Currentbin.ToOption()
25-
);
18+
)
19+
=>
20+
Plotly.NET.TraceObjects.Cumulative.init(
21+
Enabled: Enabled.ToOption(),
22+
Direction: Direction.ToOption(),
23+
Currentbin: Currentbin.ToOption()
24+
);
2625
}
2726

src/Plotly.NET.CSharp/ObjectAbstractions/TraceObjects/Dimensions.cs

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,61 @@
33
using System;
44
using System.Collections.Generic;
55
using System.Linq;
6+
using System.Reflection.Emit;
7+
using System.Runtime.InteropServices;
68
using System.Text;
79
using System.Threading.Tasks;
810

911
namespace Plotly.NET.CSharp;
1012

1113
public static partial class TraceObjects
1214
{
13-
public static Plotly.NET.TraceObjects.Dimension Dimension<LabelType, TextType, ValueType>
15+
public static Plotly.NET.TraceObjects.Dimension InitParallelDimension<LabelType, TickType, ValuesType>
1416
(
15-
1617
Optional<StyleParam.Range> ConstraintRange = default,
1718
Optional<LabelType> Label = default,
1819
Optional<bool> MultiSelect = default,
1920
Optional<string> Name = default,
2021
Optional<StyleParam.Range> Range = default,
2122
Optional<string> TemplateItemName = default,
2223
Optional<StyleParam.TickMode> TickFormat = default,
23-
Optional<IEnumerable<TextType>> TickText = default,
24-
Optional<IEnumerable<ValueType>> Tickvals = default,
25-
Optional<IEnumerable<ValueType>> Values = default,
26-
Optional<bool> Visible = default,
27-
Optional<bool> AxisMatches = default,
28-
Optional<StyleParam.AxisType> AxisType = default,
29-
Optional<#IConvertible> Label = default,
30-
Optional<string> Name = default,
31-
Optional<string> TemplateItemName = default,
32-
Optional<IEnumerable<#IConvertible>> Values = default,
24+
Optional<IEnumerable<TickType>> TickText = default,
25+
Optional<IEnumerable<TickType>> Tickvals = default,
26+
Optional<IEnumerable<ValuesType>> Values = default,
3327
Optional<bool> Visible = default
34-
) =>
35-
Plotly.NET.TraceObjects.Dimension.init(
28+
)
29+
where LabelType : IConvertible
30+
where TickType : IConvertible
31+
where ValuesType : IConvertible
32+
=>
33+
Plotly.NET.TraceObjects.Dimension.initParallel<LabelType, TickType, TickType, ValuesType>(
34+
ConstraintRange: ConstraintRange.ToOption(),
35+
Label: Label.ToOption(),
36+
MultiSelect: MultiSelect.ToOption(),
37+
Name: Name.ToOption(),
38+
Range: Range.ToOption(),
39+
TemplateItemName: TemplateItemName.ToOption(),
40+
TickFormat: TickFormat.ToOption(),
41+
TickText: TickText.ToOption(),
42+
Tickvals: Tickvals.ToOption(),
43+
Values: Values.ToOption(),
44+
Visible: Visible.ToOption()
45+
);
3646

37-
ConstraintRange: ConstraintRange.ToOption(),
38-
Label: Label.ToOption(),
39-
MultiSelect: MultiSelect.ToOption(),
40-
Name: Name.ToOption(),
41-
Range: Range.ToOption(),
42-
TemplateItemName: TemplateItemName.ToOption(),
43-
TickFormat: TickFormat.ToOption(),
44-
TickText: TickText.ToOption(),
45-
Tickvals: Tickvals.ToOption(),
46-
Values: Values.ToOption(),
47-
Visible: Visible.ToOption(),
47+
public static Plotly.NET.TraceObjects.Dimension InitSplomDimension<LabelType, ValuesType>
48+
(
49+
Optional<bool> AxisMatches = default,
50+
Optional<StyleParam.AxisType> AxisType = default,
51+
Optional<LabelType> Label = default,
52+
Optional<string> Name = default,
53+
Optional<string> TemplateItemName = default,
54+
Optional<IEnumerable<ValuesType>> Values = default,
55+
Optional<bool> Visible = default
56+
)
57+
where LabelType : IConvertible
58+
where ValuesType : IConvertible
59+
=>
60+
Plotly.NET.TraceObjects.Dimension.initSplom<LabelType, ValuesType>(
4861
AxisMatches: AxisMatches.ToOption(),
4962
AxisType: AxisType.ToOption(),
5063
Label: Label.ToOption(),

src/Plotly.NET.CSharp/ObjectAbstractions/TraceObjects/Error.cs

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ namespace Plotly.NET.CSharp;
1010

1111
public static partial class TraceObjects
1212
{
13-
public static Plotly.NET.TraceObjects.Error Error
13+
public static Plotly.NET.TraceObjects.Error InitError<ArrayType, ArrayminusType>
1414
(
15-
1615
Optional<bool> Visible = default,
1716
Optional<StyleParam.ErrorType> Type = default,
1817
Optional<bool> Symmetric = default,
19-
Optional<IEnumerable<#IConvertible>> Array = default,
20-
Optional<IEnumerable<#IConvertible>> Arrayminus = default,
18+
Optional<IEnumerable<ArrayType>> Array = default,
19+
Optional<IEnumerable<ArrayminusType>> Arrayminus = default,
2120
Optional<double> Value = default,
2221
Optional<double> Valueminus = default,
2322
Optional<int> Traceref = default,
@@ -26,22 +25,24 @@ public static Plotly.NET.TraceObjects.Error Error
2625
Optional<Color> Color = default,
2726
Optional<double> Thickness = default,
2827
Optional<double> Width = default
29-
) =>
30-
Plotly.NET.TraceObjects.Error.init(
31-
32-
Visible: Visible.ToOption(),
33-
Type: Type.ToOption(),
34-
Symmetric: Symmetric.ToOption(),
35-
Array: Array.ToOption(),
36-
Arrayminus: Arrayminus.ToOption(),
37-
Value: Value.ToOption(),
38-
Valueminus: Valueminus.ToOption(),
39-
Traceref: Traceref.ToOption(),
40-
Tracerefminus: Tracerefminus.ToOption(),
41-
Copy_ystyle: Copy_ystyle.ToOption(),
42-
Color: Color.ToOption(),
43-
Thickness: Thickness.ToOption(),
44-
Width: Width.ToOption()
45-
);
28+
)
29+
where ArrayType: IConvertible
30+
where ArrayminusType: IConvertible
31+
=>
32+
Plotly.NET.TraceObjects.Error.init(
33+
Visible: Visible.ToOption(),
34+
Type: Type.ToOption(),
35+
Symmetric: Symmetric.ToOption(),
36+
Array: Array.ToOption(),
37+
Arrayminus: Arrayminus.ToOption(),
38+
Value: Value.ToOption(),
39+
Valueminus: Valueminus.ToOption(),
40+
Traceref: Traceref.ToOption(),
41+
Tracerefminus: Tracerefminus.ToOption(),
42+
Copy_ystyle: Copy_ystyle.ToOption(),
43+
Color: Color.ToOption(),
44+
Thickness: Thickness.ToOption(),
45+
Width: Width.ToOption()
46+
);
4647
}
4748

0 commit comments

Comments
 (0)