Skip to content

Commit

Permalink
Merge pull request #473 from plotly/remove-core-interop
Browse files Browse the repository at this point in the history
Remove core C# interop
  • Loading branch information
kMutagene authored Jan 13, 2025
2 parents c859265 + b6df9ea commit f574116
Show file tree
Hide file tree
Showing 127 changed files with 10,046 additions and 10,942 deletions.
9 changes: 0 additions & 9 deletions Plotly.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharpConsole", "tests\Cons
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "CoreTests", "tests\CoreTests\CoreTests\CoreTests.fsproj", "{DA7BC908-7DC9-4BA7-8100-17D3FD2901EA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpInteroperabilityTests", "tests\CoreTests\CSharpInteroperabilityTests\CSharpInteroperabilityTests.csproj", "{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "StrongNameTests", "tests\CoreTests\StrongNameTests\StrongNameTests.fsproj", "{32E187BB-D1D4-4864-A021-55A7A08E17EC}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ImageExportTests", "tests\ExtensionLibsTests\ImageExportTests\ImageExportTests.fsproj", "{A3693DD1-4D34-4B10-B310-07A4C7433F7D}"
Expand Down Expand Up @@ -288,12 +286,6 @@ Global
{DA7BC908-7DC9-4BA7-8100-17D3FD2901EA}.Dotnet|Any CPU.Build.0 = Debug|Any CPU
{DA7BC908-7DC9-4BA7-8100-17D3FD2901EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA7BC908-7DC9-4BA7-8100-17D3FD2901EA}.Release|Any CPU.Build.0 = Release|Any CPU
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}.Dotnet|Any CPU.ActiveCfg = Debug|Any CPU
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}.Dotnet|Any CPU.Build.0 = Debug|Any CPU
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1}.Release|Any CPU.Build.0 = Release|Any CPU
{32E187BB-D1D4-4864-A021-55A7A08E17EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{32E187BB-D1D4-4864-A021-55A7A08E17EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{32E187BB-D1D4-4864-A021-55A7A08E17EC}.Dotnet|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -344,7 +336,6 @@ Global
{029EBCB4-0E8B-40F8-B7AA-61B814FAE5A6} = {E8897848-2EF4-4126-9315-ADE0BA92D951}
{598AB47B-EFE7-414A-B6EA-8C96B4AA7A4C} = {E8897848-2EF4-4126-9315-ADE0BA92D951}
{DA7BC908-7DC9-4BA7-8100-17D3FD2901EA} = {023425D8-B375-45ED-A29A-A3ED00C0E2BC}
{C10C0225-FBBA-4E3C-99FD-FA4A2BCBB3B1} = {023425D8-B375-45ED-A29A-A3ED00C0E2BC}
{32E187BB-D1D4-4864-A021-55A7A08E17EC} = {023425D8-B375-45ED-A29A-A3ED00C0E2BC}
{A3693DD1-4D34-4B10-B310-07A4C7433F7D} = {02886FBB-DB32-4BBB-A93C-E13EBF453ACC}
{1170E3A9-D83E-40B0-8D51-20485C76BE88} = {02886FBB-DB32-4BBB-A93C-E13EBF453ACC}
Expand Down
2 changes: 0 additions & 2 deletions build/ProjectInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,10 @@ let testBaseProjects = [

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

/// contains project info about the core test projects
let testProjectsCore = [
CoreTestProject
CSharpInteroperabilityTestProject
]

let ImageExportTestProject = ProjectInfo.create("ImageExportTests", "tests/ExtensionLibsTests/ImageExportTests/ImageExportTests.fsproj")
Expand Down
15 changes: 13 additions & 2 deletions src/Plotly.NET.CSharp/ChartAPI/Chart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,22 @@

namespace Plotly.NET.CSharp
{
/// <summary>
///
/// </summary>
public static partial class Chart
{
public static GenericChart Combine(IEnumerable<GenericChart> gCharts) => Plotly.NET.Chart.Combine(gCharts);

/// <summary>
/// Create a combined chart with the given charts merged
/// </summary>
/// <param name="gCharts">the charts to combine</param>
/// <returns></returns>
public static GenericChart Combine(IEnumerable<GenericChart> gCharts) => Plotly.NET.Chart.combine(gCharts);

/// <summary>
/// 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)
/// </summary>
/// <returns></returns>
public static GenericChart Invisible() => Plotly.NET.Chart.Invisible();

/// <summary>
Expand Down
411 changes: 317 additions & 94 deletions src/Plotly.NET.CSharp/ChartAPI/Chart2D.cs

Large diffs are not rendered by default.

72 changes: 67 additions & 5 deletions src/Plotly.NET.CSharp/ChartAPI/Chart3D.cs

Large diffs are not rendered by default.

72 changes: 65 additions & 7 deletions src/Plotly.NET.CSharp/ChartAPI/ChartDomain.cs

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions src/Plotly.NET.CSharp/ChartAPI/ChartMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Plotly.NET.LayoutObjects;
using Plotly.NET.TraceObjects;
using System.Runtime.InteropServices;
using static Plotly.NET.StyleParam;

namespace Plotly.NET.CSharp
{
Expand Down Expand Up @@ -416,6 +417,7 @@ public static GenericChart BubbleGeo<LongitudesType, LatitudesType, TextType>(
/// <param name="longitudes">Sets the longitude coordinates (in degrees East).</param>
/// <param name="latitudes">Sets the latitude coordinates (in degrees North).</param>
/// <param name="mode">Determines the drawing mode for this scatter trace.</param>
/// <param name="MapboxStyle">Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
Expand Down Expand Up @@ -443,6 +445,7 @@ public static GenericChart ScatterMapbox<LongitudesType, LatitudesType, TextType
IEnumerable<LongitudesType> longitudes,
IEnumerable<LatitudesType> latitudes,
StyleParam.Mode mode,
Optional<StyleParam.MapboxStyle> MapboxStyle = default,
Optional<string> Name = default,
Optional<bool> ShowLegend = default,
Optional<double> Opacity = default,
Expand Down Expand Up @@ -475,6 +478,7 @@ public static GenericChart ScatterMapbox<LongitudesType, LatitudesType, TextType
longitudes: longitudes,
latitudes: latitudes,
mode: mode,
MapboxStyle: MapboxStyle.ToOption(),
Name: Name.ToOption(),
ShowLegend: ShowLegend.ToOption(),
Opacity: Opacity.ToOption(),
Expand Down Expand Up @@ -510,6 +514,7 @@ public static GenericChart ScatterMapbox<LongitudesType, LatitudesType, TextType
/// <param name="longitudes">Sets the longitude coordinates (in degrees East).</param>
/// <param name="latitudes">Sets the latitude coordinates (in degrees North).</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="MapboxStyle">Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets.</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
Expand All @@ -531,6 +536,7 @@ public static GenericChart PointMapbox<LongitudesType, LatitudesType, TextType>(
IEnumerable<LongitudesType> longitudes,
IEnumerable<LatitudesType> latitudes,
Optional<string> Name = default,
Optional<StyleParam.MapboxStyle> MapboxStyle = default,
Optional<bool> ShowLegend = default,
Optional<double> Opacity = default,
Optional<IEnumerable<double>> MultiOpacity = default,
Expand All @@ -557,6 +563,7 @@ public static GenericChart PointMapbox<LongitudesType, LatitudesType, TextType>(
longitudes: longitudes,
latitudes: latitudes,
Name: Name.ToOption(),
MapboxStyle: MapboxStyle.ToOption(),
ShowLegend: ShowLegend.ToOption(),
Opacity: Opacity.ToOption(),
MultiOpacity: MultiOpacity.ToOption(),
Expand Down Expand Up @@ -587,6 +594,7 @@ public static GenericChart PointMapbox<LongitudesType, LatitudesType, TextType>(
/// <param name="latitudes">Sets the latitude coordinates (in degrees North).</param>
/// <param name="ShowMarkers"></param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="MapboxStyle">Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets.</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
Expand All @@ -612,6 +620,7 @@ public static GenericChart LineMapbox<LongitudesType, LatitudesType, TextType>(
IEnumerable<LatitudesType> latitudes,
Optional<bool> ShowMarkers = default,
Optional<string> Name = default,
Optional<StyleParam.MapboxStyle> MapboxStyle = default,
Optional<bool> ShowLegend = default,
Optional<double> Opacity = default,
Optional<IEnumerable<double>> MultiOpacity = default,
Expand Down Expand Up @@ -642,6 +651,7 @@ public static GenericChart LineMapbox<LongitudesType, LatitudesType, TextType>(
latitudes: latitudes,
ShowMarkers: ShowMarkers.ToOption(),
Name: Name.ToOption(),
MapboxStyle: MapboxStyle.ToOption(),
ShowLegend: ShowLegend.ToOption(),
Opacity: Opacity.ToOption(),
MultiOpacity: MultiOpacity.ToOption(),
Expand Down Expand Up @@ -675,6 +685,7 @@ public static GenericChart LineMapbox<LongitudesType, LatitudesType, TextType>(
/// <param name="latitudes">Sets the latitude coordinates (in degrees North).</param>
/// <param name="sizes">Sets the size of the points.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="MapboxStyle">Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets.</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="MultiOpacity">Sets the opactity of individual datum markers</param>
Expand All @@ -695,6 +706,7 @@ public static GenericChart BubbleMapbox<LongitudesType, LatitudesType, TextType>
IEnumerable<LatitudesType> latitudes,
IEnumerable<int> sizes,
Optional<string> Name = default,
Optional<StyleParam.MapboxStyle> MapboxStyle = default,
Optional<bool> ShowLegend = default,
Optional<double> Opacity = default,
Optional<IEnumerable<double>> MultiOpacity = default,
Expand All @@ -720,6 +732,7 @@ public static GenericChart BubbleMapbox<LongitudesType, LatitudesType, TextType>
latitudes: latitudes,
sizes: sizes,
Name: Name.ToOption(),
MapboxStyle: MapboxStyle.ToOption(),
ShowLegend: ShowLegend.ToOption(),
Opacity: Opacity.ToOption(),
MultiOpacity: MultiOpacity.ToOption(),
Expand Down Expand Up @@ -752,6 +765,7 @@ public static GenericChart BubbleMapbox<LongitudesType, LatitudesType, TextType>
/// <param name="z">The color values for each location</param>
/// <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>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover.</param>
/// <param name="MapboxStyle">Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets.</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <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>
/// <param name="Text">Sets a text associated with each datum</param>
Expand All @@ -767,6 +781,7 @@ public static GenericChart ChoroplethMapbox<ZType, TextType>(
IEnumerable<ZType> z,
object geoJson,
Optional<string> Name = default,
Optional<StyleParam.MapboxStyle> MapboxStyle = default,
Optional<bool> ShowLegend = default,
Optional<string> FeatureIdKey = default,
Optional<TextType> Text = default,
Expand All @@ -785,6 +800,7 @@ public static GenericChart ChoroplethMapbox<ZType, TextType>(
locations: locations,
z: z,
Name: Name.ToOption(),
MapboxStyle: MapboxStyle.ToOption(),
ShowLegend: ShowLegend.ToOption(),
geoJson: geoJson,
FeatureIdKey: FeatureIdKey.ToOption(),
Expand All @@ -808,6 +824,7 @@ public static GenericChart ChoroplethMapbox<ZType, TextType>(
/// <param name="longitudes">Sets the longitude coordinates (in degrees East).</param>
/// <param name="latitudes">Sets the latitude coordinates (in degrees North).</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover.</param>
/// <param name="MapboxStyle">Sets the base mapbox layer. Default is `OpenStreetMap`. Note that you will need an access token for some Mapbox presets.</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opacity of the trace</param>
/// <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>
Expand All @@ -824,6 +841,7 @@ public static GenericChart DensityMapbox<LongitudesType, LatitudesType, ZType, T
IEnumerable<LongitudesType> longitudes,
IEnumerable<LatitudesType> latitudes,
Optional<string> Name = default,
Optional<StyleParam.MapboxStyle> MapboxStyle = default,
Optional<bool> ShowLegend = default,
Optional<double> Opacity = default,
Optional<IEnumerable<ZType>> Z = default,
Expand All @@ -846,6 +864,7 @@ public static GenericChart DensityMapbox<LongitudesType, LatitudesType, ZType, T
longitudes: longitudes,
latitudes: latitudes,
Name: Name.ToOption(),
MapboxStyle: MapboxStyle.ToOption(),
ShowLegend: ShowLegend.ToOption(),
Opacity: Opacity.ToOption(),
Z: Z.ToOption(),
Expand Down
Loading

0 comments on commit f574116

Please sign in to comment.