This project has moved and is read-only. For the latest updates, please go here.
1
Vote

should check _mHeaderInfo.Dates.Count in Chart._Draw

description

when _mHeaderInfo.Dates.Count==0, graphics.DrawRectangles(this.HeaderFormat.Border, _mHeaderInfo.Columns.ToArray()) throws parameter is not valid exception.

comments

jakesee wrote Nov 7, 2013 at 8:19 AM

Hello JiaruiLin,

Thanks for your feedback.

I found the line
graphics.DrawRectangles(this.HeaderFormat.Border, _mHeaderInfo.Columns.ToArray()) 
inside Chart::_DrawColumns() and I explicitly added a new List<DateTime> before it:
_mHeaderInfo.Dates = new List<DateTime>();
graphics.DrawRectangles(this.HeaderFormat.Border, _mHeaderInfo.Columns.ToArray()) 
But I am not getting an exception.

Can you please provide code or use case where the exception will be thrown?