-
Notifications
You must be signed in to change notification settings - Fork 98
Create different Chart Types in C# #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @LucasNmn, can you give me a sample code snippet so i can test if i can reproduce what you are experiencing? |
Working Sample (with Point):
or without optional arguments:
Not Working (for Example Line) : or So the initialization fails and Visual Studio tells me that the type arguments are not explicit. |
yep, that one is on us. In many places we let the F# type inference handle the typing of arguments for us, and that does not seem to translate well into C#. The offenders in the case of static void Main(string[] args)
{
double[] x = new double[] { 1, 2 };
double[] y = new double[] { 5, 10 };
GenericChart.GenericChart chart = Chart.Line<double,double,StyleParam.DrawingStyle,double>(x: x, y: y, Dash: StyleParam.DrawingStyle.Dash, Width:.2 );
chart
.WithTraceName("Hello from C#", true)
.WithX_AxisStyle(title: "xAxis", Showgrid: false, Showline: true)
.WithY_AxisStyle(title: "yAxis", Showgrid: false, Showline: true)
.Show();
} This is not ideal and i will try to fix this asap by adding explicit type annotations for all Chart Extensions. |
i also expect Some Csharp examples. |
Ok, thanks for the tip. I will try that. |
It's working. Thanks! |
Hi there,
I am able to create different point charts in C# with Plotly. As soon as I choose a different chart type like Line, the implementation fails. It makes no difference whether I only specify the two data sequences or the whole parameters that are not required.
Is this a known issue or am i missing something?
The text was updated successfully, but these errors were encountered: