I have 2 series which I'm adding to the same chartarea. Both series have the same structure (date on x-axis, amount on y-axis). The first series has values from 01 Oct to 15 Oct and the second from 16 Oct to 31 Oct.
I add the first series as follows:
var series = new Series
{
ChartType = SeriesChartType.SplineArea
};
series.Points.DataBindXY(data.Select(x => x.Date).ToArray(), data.Select(x => x.Amount).ToArray());
chart.Series.Add(series);
And the second series:
series = new Series
{
ChartType = SeriesChartType.Line,
BorderWidth = 2,
BorderDashStyle = ChartDashStyle.Dot
};
series.Points.DataBindXY(pred.Select(x => x.Date).ToArray(), pred.Select(x => x.Amount).ToArray());
chart.Series.Add(series);
The dates are correct and they are sequential. There are no overlapping.
However, this is what's being plotted:
The second series should begin at the end of the first series but they're overlapping.
Am I missing something?