I have some sample data in SQL which i'm able to query into sub groups and add to an xbar r graph, however, if i try to add the time i keep getting the following error. Unable to cast object of type 'System.DateTime' to type 'com.quinncurtis.chart2dnet.ChartCalendar' I've tried all different types but having no success, the date is a datetime object in sql that i'm pulling.
The time values for the AddNewSampleRecord method are ChartCalendar types. We use the ChartCalendar class because it contains extensive time/date arithmetic methods we use in calculations. So that is the type you must use. So convert your DateTime values to ChartCalendar values. This is trivial because the ChartCalendar class has a constructor which takes a DateTime value as an input parameter.
DateTime dt = GetSampleDateTimeValue();
// Convert the DateTime value to a ChartCalendar value, and call the AddNewSampleRecord method