I am trying to draw a simple LineSeries with LiveChart. Because computer/array index by default starts with 0, and human (non-programmer) starts counting with 1, so I like to display the value's index starting with 1 (i.e. index+1), but could not figure out how to do this.
I read the LiveChart documentation on Types and Configurations, and tried to get a mapper of index + 1 into the SeriesCollection but I get an invalid argument error: cannot convert from 'LiveCharts.Configurations.CartesianMapper' to 'LiveCharts.Definitions.Series.ISeriesView'
var mapper1 = new CartesianMapper<double>()
.X((value, index) => index + 1)
.Y((value, index) => value);
sc = new SeriesCollection
{
new LineSeries
{
Values = new ChartValues<double>() {1,2,3,4,1,2,3,4,1,2},
},
mapper1
};