-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Description
Description
Can't build a simple code for Plotly.NET C# Binding in a rage plot graph:
https://plotly.net/02_3_range-plots.html
I am trying to translate F# code to C#
Repro steps
- I am trying to make a Range Graph with code provided in F# translated to C#:
...
using Plotly.NET.CSharp;
using Microsoft.Web.WebView2;
using Microsoft.Web.WebView2.WinForms;
using Plotly.NET.TraceObjects;
using Plotly.NET;
...
Plotly.NET.Chart2D.Chart.Range(
x: new double[] { 1, 2 },
y: new double[] { 5, 10 },
upper: X,
lower: Y,
mode: StyleParam.Mode.Lines_Markers,
MarkerColor: System.Drawing.Color.FromName("Blue"),
RangeColor : System.Drawing.Color.FromName("Red")
)
.WithTraceInfo("Hello from C#", ShowLegend: true)
.WithXAxisStyle<double, double, string, double>(Title: Plotly.NET.Title.init("xAxis"))
.WithYAxisStyle<double, double, string, double>(Title: Plotly.NET.Title.init("yAxis"))
.SaveHtml(strPath);
- There is an error in IDE
Expected behavior
With other charts this library works
Actual behavior
Maybe there is an error in the argument, but with no documentation for API in C# it results tricky.
Known workarounds
Unknown
Related information
- Operating system: Windows 10
- Branch: version 4.1.0
- .NET Runtime, CoreCLR or Mono Version: .net 7.0
- Performance information, links to performance testing scripts: no scripts
Metadata
Metadata
Assignees
Labels
No labels