'Create Multiline Chart with Plotly

Using Net 6 and Plotly I have:

List<Int32> xValues = Enumerable.Range(1, 500);

List<Single> y1Values = getY1Values();

List<Single> y2Values = getY2Values();  

How to create one Plotly.Net C# chart with 2 lines (for y1Values and for y2Values)?

I was only able to create with one set of y values:

GenericChart.GenericChart chart = Chart2D.Chart.Line<Int32, Single, String>(xValues, y1Values);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source