I need a AreaChart which displays the NULL values in a special color.I use a DataTable as DataSource and everything works fine.But when i set the property "TreatDateTimeAsString" to FALSE, the Chart will be painted completly different.Here is my code, and two screenshots of the different display.
Code:
private void button7_Click(object sender, EventArgs e) { ultraChart1.ChartType = ChartType.AreaChart; ultraChart1.Data.EmptyStyle.EnablePE = true; ultraChart1.Data.EmptyStyle.EnableLineStyle = true; ultraChart1.Data.EmptyStyle.LineStyle.DrawStyle = LineDrawStyle.Dot; ultraChart1.Data.EmptyStyle.PE.Fill = Color.Red; ultraChart1.AreaChart.NullHandling = NullHandling.InterpolateSimple; ultraChart1.AreaChart.TreatDateTimeAsString = false; ultraChart1.Data.SwapRowsAndColumns = true; ultraChart1.Data.DataSource = GetData(); ultraChart1.Axis.Y.Labels.ItemFormatString = "<DATA_VALUE:0.#>"; ultraChart1.Axis.X.Labels.ItemFormatString = "<ITEM_LABEL>"; }
private DataTable GetData() { DataTable table = new DataTable(); DateTime CurrentTime = DateTime.Now; table.Columns.Add("Value Column", typeof(double)); table.Columns.Add("Time Column", typeof(DateTime)); table.Rows.Add(new object[ { 7.0, CurrentTime }); table.Rows.Add(new object[ { 4.0, CurrentTime.AddMinutes(5) }); table.Rows.Add(new object[ { null, CurrentTime.AddMinutes(10) }); table.Rows.Add(new object[ { 9.0, CurrentTime.AddMinutes(15) }); table.Rows.Add(new object[ { 5.0, CurrentTime.AddMinutes(20) }); return table; }
Picture when TreatDateTimeAsString = TRUE:
Picture when TreatDateTimeAsString = FALSE;
This looks like a bug. Could you please report this to Developer Support? They can create a bug report, so that you can be notified when a fix is available. You can use the following link to submit an incident: http://ko.infragistics.com/gethelp
Did this problem get reported? If so, has there been a resolution?
This issue has been fixed. Please download the latest hotfix here:https://ko.infragistics.com/Membership/Default.aspx?panel=Downloads#DownloadsThe issue should not exist in version 8.2 and later