-
|
Hello, friend 👋 I'm developing in C#, and I wonder how do you pass in static void CreateAndOpenCharts(GenericChart[] charts, string fileName)
{
var dashboardChart = Chart.Grid(
gCharts: charts,
nRows: charts.Length,
nCols: 2)
.WithTitle("Core Loop Dashboard Report")
.WithSize(1200, 600 * charts.Length);
var filePath = Path.Combine(Environment.CurrentDirectory, $"{fileName}.html");
dashboardChart.SaveHtml(filePath);
FileUtility.OpenFile($"{fileName}.html");
}The documentation has an example, but it seems like the syntax is outdated, and cannot compile. Or is it just me not knowing how this syntax works? var chartCombined = new []{scatter,bar};
Chart.Grid<IEnumerable<GenericChart.GenericChart>>(1,2).Invoke(chartCombined)Sorry for the noob question. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I didn't know using Plotly.NET.CSharp;
...
static void CreateAndOpenCharts(GenericChart[] charts, string fileName)
{
var dashboardChart = Plotly.NET.CSharp.Chart.Grid(charts, charts.Length, 2)
.WithTitle("Core Loop Dashboard Report")
.WithSize(1200, 600 * charts.Length);
var filePath = Path.Combine(Environment.CurrentDirectory, $"{fileName}.html");
Plotly.NET.CSharp.GenericChartExtensions.SaveHtml(dashboardChart, filePath);
FileUtility.OpenFile($"{fileName}.html");
}Thank you, Kevin! |
Beta Was this translation helpful? Give feedback.
I didn't know
using Plotly.NET.CSharp;is needed to showGrid()withgChartsoverload. So the solution is,Thank you, Kevin!
You're the best ❤️ !