Skip to content

Commit f574116

Browse files
authored
Merge pull request #473 from plotly/remove-core-interop
Remove core C# interop
2 parents c859265 + b6df9ea commit f574116

File tree

127 files changed

+10046
-10942
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+10046
-10942
lines changed

Plotly.NET.sln

-9
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharpConsole", "tests\Cons
8686
EndProject
8787
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "CoreTests", "tests\CoreTests\CoreTests\CoreTests.fsproj", "{DA7BC908-7DC9-4BA7-8100-17D3FD2901EA}"
8888
EndProject
89-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpInteroperabilityTests", "tests\CoreTests\CSharpInteroperabilityTests\CSharpInteroperabilityTests.csproj", "{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}"
90-
EndProject
9189
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "StrongNameTests", "tests\CoreTests\StrongNameTests\StrongNameTests.fsproj", "{32E187BB-D1D4-4864-A021-55A7A08E17EC}"
9290
EndProject
9391
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ImageExportTests", "tests\ExtensionLibsTests\ImageExportTests\ImageExportTests.fsproj", "{A3693DD1-4D34-4B10-B310-07A4C7433F7D}"
@@ -288,12 +286,6 @@ Global
288286
{DA7BC908-7DC9-4BA7-8100-17D3FD2901EA}.Dotnet|Any CPU.Build.0 = Debug|Any CPU
289287
{DA7BC908-7DC9-4BA7-8100-17D3FD2901EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
290288
{DA7BC908-7DC9-4BA7-8100-17D3FD2901EA}.Release|Any CPU.Build.0 = Release|Any CPU
291-
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
292-
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
293-
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}.Dotnet|Any CPU.ActiveCfg = Debug|Any CPU
294-
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}.Dotnet|Any CPU.Build.0 = Debug|Any CPU
295-
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
296-
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}.Release|Any CPU.Build.0 = Release|Any CPU
297289
{32E187BB-D1D4-4864-A021-55A7A08E17EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
298290
{32E187BB-D1D4-4864-A021-55A7A08E17EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
299291
{32E187BB-D1D4-4864-A021-55A7A08E17EC}.Dotnet|Any CPU.ActiveCfg = Debug|Any CPU
@@ -344,7 +336,6 @@ Global
344336
{029EBCB4-0E8B-40F8-B7AA-61B814FAE5A6} = {E8897848-2EF4-4126-9315-ADE0BA92D951}
345337
{598AB47B-EFE7-414A-B6EA-8C96B4AA7A4C} = {E8897848-2EF4-4126-9315-ADE0BA92D951}
346338
{DA7BC908-7DC9-4BA7-8100-17D3FD2901EA} = {023425D8-B375-45ED-A29A-A3ED00C0E2BC}
347-
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1} = {023425D8-B375-45ED-A29A-A3ED00C0E2BC}
348339
{32E187BB-D1D4-4864-A021-55A7A08E17EC} = {023425D8-B375-45ED-A29A-A3ED00C0E2BC}
349340
{A3693DD1-4D34-4B10-B310-07A4C7433F7D} = {02886FBB-DB32-4BBB-A93C-E13EBF453ACC}
350341
{1170E3A9-D83E-40B0-8D51-20485C76BE88} = {02886FBB-DB32-4BBB-A93C-E13EBF453ACC}

build/ProjectInfo.fs

-2
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,10 @@ let testBaseProjects = [
7373

7474
// test projects (.NET)
7575
let CoreTestProject = ProjectInfo.create("CoreTests", "tests/CoreTests/CoreTests/CoreTests.fsproj")
76-
let CSharpInteroperabilityTestProject = ProjectInfo.create("CSharpInteroperabilityTests", "tests/CoreTests/CSharpInteroperabilityTests/CSharpInteroperabilityTests.csproj")
7776

7877
/// contains project info about the core test projects
7978
let testProjectsCore = [
8079
CoreTestProject
81-
CSharpInteroperabilityTestProject
8280
]
8381

8482
let ImageExportTestProject = ProjectInfo.create("ImageExportTests", "tests/ExtensionLibsTests/ImageExportTests/ImageExportTests.fsproj")

src/Plotly.NET.CSharp/ChartAPI/Chart.cs

+13-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,22 @@
1010

1111
namespace Plotly.NET.CSharp
1212
{
13+
/// <summary>
14+
///
15+
/// </summary>
1316
public static partial class Chart
1417
{
15-
public static GenericChart Combine(IEnumerable<GenericChart> gCharts) => Plotly.NET.Chart.Combine(gCharts);
16-
18+
/// <summary>
19+
/// Create a combined chart with the given charts merged
20+
/// </summary>
21+
/// <param name="gCharts">the charts to combine</param>
22+
/// <returns></returns>
23+
public static GenericChart Combine(IEnumerable<GenericChart> gCharts) => Plotly.NET.Chart.combine(gCharts);
1724

25+
/// <summary>
26+
/// Creates a chart that is completely invisible when rendered. The Chart object however is NOT empty! Combining this chart with other charts will have unforseen consequences (it has for example invisible axes that can override other axes if used in Chart.Combine)
27+
/// </summary>
28+
/// <returns></returns>
1829
public static GenericChart Invisible() => Plotly.NET.Chart.Invisible();
1930

2031
/// <summary>

src/Plotly.NET.CSharp/ChartAPI/Chart2D.cs

+317-94
Large diffs are not rendered by default.

src/Plotly.NET.CSharp/ChartAPI/Chart3D.cs

+67-5
Large diffs are not rendered by default.

src/Plotly.NET.CSharp/ChartAPI/ChartDomain.cs

+65-7
Large diffs are not rendered by default.

src/Plotly.NET.CSharp/ChartAPI/ChartMap.cs

+19
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Plotly.NET.LayoutObjects;
88
using Plotly.NET.TraceObjects;
99
using System.Runtime.InteropServices;
10+
using static Plotly.NET.StyleParam;
1011

1112
namespace Plotly.NET.CSharp
1213
{
@@ -416,6 +417,7 @@ public static GenericChart BubbleGeo<LongitudesType, LatitudesType, TextType>(
416417
/// <param name="longitudes">Sets the longitude coordinates (in degrees East).</param>
417418
/// <param name="latitudes">Sets the latitude coordinates (in degrees North).</param>
418419
/// <param name="mode">Determines the drawing mode for this scatter trace.</param>
420+
/// <param name="MapboxStyle">Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets.</param>
419421
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
420422
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
421423
/// <param name="Opacity">Sets the opactity of the trace</param>
@@ -443,6 +445,7 @@ public static GenericChart ScatterMapbox<LongitudesType, LatitudesType, TextType
443445
IEnumerable<LongitudesType> longitudes,
444446
IEnumerable<LatitudesType> latitudes,
445447
StyleParam.Mode mode,
448+
Optional<StyleParam.MapboxStyle> MapboxStyle = default,
446449
Optional<string> Name = default,
447450
Optional<bool> ShowLegend = default,
448451
Optional<double> Opacity = default,
@@ -475,6 +478,7 @@ public static GenericChart ScatterMapbox<LongitudesType, LatitudesType, TextType
475478
longitudes: longitudes,
476479
latitudes: latitudes,
477480
mode: mode,
481+
MapboxStyle: MapboxStyle.ToOption(),
478482
Name: Name.ToOption(),
479483
ShowLegend: ShowLegend.ToOption(),
480484
Opacity: Opacity.ToOption(),
@@ -510,6 +514,7 @@ public static GenericChart ScatterMapbox<LongitudesType, LatitudesType, TextType
510514
/// <param name="longitudes">Sets the longitude coordinates (in degrees East).</param>
511515
/// <param name="latitudes">Sets the latitude coordinates (in degrees North).</param>
512516
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
517+
/// <param name="MapboxStyle">Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets.</param>
513518
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
514519
/// <param name="Opacity">Sets the opactity of the trace</param>
515520
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
@@ -531,6 +536,7 @@ public static GenericChart PointMapbox<LongitudesType, LatitudesType, TextType>(
531536
IEnumerable<LongitudesType> longitudes,
532537
IEnumerable<LatitudesType> latitudes,
533538
Optional<string> Name = default,
539+
Optional<StyleParam.MapboxStyle> MapboxStyle = default,
534540
Optional<bool> ShowLegend = default,
535541
Optional<double> Opacity = default,
536542
Optional<IEnumerable<double>> MultiOpacity = default,
@@ -557,6 +563,7 @@ public static GenericChart PointMapbox<LongitudesType, LatitudesType, TextType>(
557563
longitudes: longitudes,
558564
latitudes: latitudes,
559565
Name: Name.ToOption(),
566+
MapboxStyle: MapboxStyle.ToOption(),
560567
ShowLegend: ShowLegend.ToOption(),
561568
Opacity: Opacity.ToOption(),
562569
MultiOpacity: MultiOpacity.ToOption(),
@@ -587,6 +594,7 @@ public static GenericChart PointMapbox<LongitudesType, LatitudesType, TextType>(
587594
/// <param name="latitudes">Sets the latitude coordinates (in degrees North).</param>
588595
/// <param name="ShowMarkers"></param>
589596
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
597+
/// <param name="MapboxStyle">Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets.</param>
590598
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
591599
/// <param name="Opacity">Sets the opactity of the trace</param>
592600
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
@@ -612,6 +620,7 @@ public static GenericChart LineMapbox<LongitudesType, LatitudesType, TextType>(
612620
IEnumerable<LatitudesType> latitudes,
613621
Optional<bool> ShowMarkers = default,
614622
Optional<string> Name = default,
623+
Optional<StyleParam.MapboxStyle> MapboxStyle = default,
615624
Optional<bool> ShowLegend = default,
616625
Optional<double> Opacity = default,
617626
Optional<IEnumerable<double>> MultiOpacity = default,
@@ -642,6 +651,7 @@ public static GenericChart LineMapbox<LongitudesType, LatitudesType, TextType>(
642651
latitudes: latitudes,
643652
ShowMarkers: ShowMarkers.ToOption(),
644653
Name: Name.ToOption(),
654+
MapboxStyle: MapboxStyle.ToOption(),
645655
ShowLegend: ShowLegend.ToOption(),
646656
Opacity: Opacity.ToOption(),
647657
MultiOpacity: MultiOpacity.ToOption(),
@@ -675,6 +685,7 @@ public static GenericChart LineMapbox<LongitudesType, LatitudesType, TextType>(
675685
/// <param name="latitudes">Sets the latitude coordinates (in degrees North).</param>
676686
/// <param name="sizes">Sets the size of the points.</param>
677687
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
688+
/// <param name="MapboxStyle">Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets.</param>
678689
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
679690
/// <param name="Opacity">Sets the opactity of the trace</param>
680691
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
@@ -695,6 +706,7 @@ public static GenericChart BubbleMapbox<LongitudesType, LatitudesType, TextType>
695706
IEnumerable<LatitudesType> latitudes,
696707
IEnumerable<int> sizes,
697708
Optional<string> Name = default,
709+
Optional<StyleParam.MapboxStyle> MapboxStyle = default,
698710
Optional<bool> ShowLegend = default,
699711
Optional<double> Opacity = default,
700712
Optional<IEnumerable<double>> MultiOpacity = default,
@@ -720,6 +732,7 @@ public static GenericChart BubbleMapbox<LongitudesType, LatitudesType, TextType>
720732
latitudes: latitudes,
721733
sizes: sizes,
722734
Name: Name.ToOption(),
735+
MapboxStyle: MapboxStyle.ToOption(),
723736
ShowLegend: ShowLegend.ToOption(),
724737
Opacity: Opacity.ToOption(),
725738
MultiOpacity: MultiOpacity.ToOption(),
@@ -752,6 +765,7 @@ public static GenericChart BubbleMapbox<LongitudesType, LatitudesType, TextType>
752765
/// <param name="z">The color values for each location</param>
753766
/// <param name="geoJson">Sets the GeoJSON data associated with this trace. It can be set as a valid GeoJSON object or as a URL string. Note that we only accept GeoJSONs of type "FeatureCollection" or "Feature" with geometries of type "Polygon" or "MultiPolygon".</param>
754767
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover.</param>
768+
/// <param name="MapboxStyle">Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets.</param>
755769
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
756770
/// <param name="FeatureIdKey">Sets the key in GeoJSON features which is used as id to match the items included in the `locations` array. Support nested property, for example "properties.name".</param>
757771
/// <param name="Text">Sets a text associated with each datum</param>
@@ -767,6 +781,7 @@ public static GenericChart ChoroplethMapbox<ZType, TextType>(
767781
IEnumerable<ZType> z,
768782
object geoJson,
769783
Optional<string> Name = default,
784+
Optional<StyleParam.MapboxStyle> MapboxStyle = default,
770785
Optional<bool> ShowLegend = default,
771786
Optional<string> FeatureIdKey = default,
772787
Optional<TextType> Text = default,
@@ -785,6 +800,7 @@ public static GenericChart ChoroplethMapbox<ZType, TextType>(
785800
locations: locations,
786801
z: z,
787802
Name: Name.ToOption(),
803+
MapboxStyle: MapboxStyle.ToOption(),
788804
ShowLegend: ShowLegend.ToOption(),
789805
geoJson: geoJson,
790806
FeatureIdKey: FeatureIdKey.ToOption(),
@@ -808,6 +824,7 @@ public static GenericChart ChoroplethMapbox<ZType, TextType>(
808824
/// <param name="longitudes">Sets the longitude coordinates (in degrees East).</param>
809825
/// <param name="latitudes">Sets the latitude coordinates (in degrees North).</param>
810826
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover.</param>
827+
/// <param name="MapboxStyle">Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets.</param>
811828
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
812829
/// <param name="Opacity">Sets the opacity of the trace</param>
813830
/// <param name="Z">Sets the points' weight. For example, a value of 10 would be equivalent to having 10 points of weight 1 in the same spot</param>
@@ -824,6 +841,7 @@ public static GenericChart DensityMapbox<LongitudesType, LatitudesType, ZType, T
824841
IEnumerable<LongitudesType> longitudes,
825842
IEnumerable<LatitudesType> latitudes,
826843
Optional<string> Name = default,
844+
Optional<StyleParam.MapboxStyle> MapboxStyle = default,
827845
Optional<bool> ShowLegend = default,
828846
Optional<double> Opacity = default,
829847
Optional<IEnumerable<ZType>> Z = default,
@@ -846,6 +864,7 @@ public static GenericChart DensityMapbox<LongitudesType, LatitudesType, ZType, T
846864
longitudes: longitudes,
847865
latitudes: latitudes,
848866
Name: Name.ToOption(),
867+
MapboxStyle: MapboxStyle.ToOption(),
849868
ShowLegend: ShowLegend.ToOption(),
850869
Opacity: Opacity.ToOption(),
851870
Z: Z.ToOption(),

0 commit comments

Comments
 (0)