score:1

I had the same problem for a long time. I finally found that i needed to clear the dataset and add the new data back into a new dataset then update the chart.

I am clearing the data set with _lineConfig.Data.Datasets.Clear();

then create a new version as below

TempProductionLineTotal = SqlProdData.GetProductionTotals(searchDate[0], searchDate[1]);

_productionDataSet = new LineDataset<TimeTuple<int>>   
{
BackgroundColor = ColorUtil.FromDrawingColor(System.Drawing.Color.Orange),
BorderColor = ColorUtil.FromDrawingColor(System.Drawing.Color.Orange),
Label = "Daily Total",
Fill = false,
BorderWidth = 2,
PointRadius = 1,
PointBorderWidth = 2,
SteppedLine = SteppedLine.False,
Hidden = false,
LineTension = 0.0   };

_productionDataSet.AddRange(TempProductionLineTotal

.Select(p => new TimeTuple<int>(new Moment(p.DateNTime),Convert.ToInt32(p.Daily_Lineal))));

_lineConfig.Data.Datasets.Add(_productionDataSet);

Related Query

More Query from same tag