public static ExtendedChartData UnlabelledData() { var result = new ExtendedChartData() { Labels = new List <string> { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" } }; var series = new SeriesData(); series.SeriesPoints.Add(new SeriesPoint { Y = 12 }); series.SeriesPoints.Add(new SeriesPoint { Y = 9 }); series.SeriesPoints.Add(new SeriesPoint { Y = 7 }); series.SeriesPoints.Add(new SeriesPoint { Y = 8 }); series.SeriesPoints.Add(new SeriesPoint { Y = 5 }); result.Series.Add(series); return(result); }
public void ConvertListOfDoubleWhenUsingAddOverride() { //arrange var testList = new List <double?> { 0, 1, 2, 4, 5 }; var sut = new ExtendedChartData(); //act sut.Series.Add(testList); int i = 0; //assert foreach (var items in testList) { Assert.Null(sut.Series[0].SeriesPoints[i].X); Assert.Equal(testList[i], sut.Series[0].SeriesPoints[i].Y); i++; } }