Hello,
When setting the DataSource of the OlapAxis, it throws NullReferenceException.
Here is the code snippet that causes the exception:
var numericYAxis= new NumericYAxis() { LabelSettings = new AxisLabelSettings() { Extent = 55, Location = AxisLabelsLocation.OutsideLeft, IsHitTestVisible = true } }; DataChart.Axes.Add(numericYAxis);
OlapXAxis olapXAxis = new OlapXAxis(); olapXAxis.YAxis = numericYAxis; olapXAxis.Label = "{Label}"; olapXAxis.OlapAxisSource = OlapAxisSource.Rows; olapXAxis.LabelSettings = new AxisLabelSettings(); olapXAxis.LabelSettings.Extent = 35; olapXAxis.LabelSettings.Location = AxisLabelsLocation.OutsideBottom; olapXAxis.DataSource = chartViewModel.OlapViewModel;//Note:OlapViewModel is not null
at Infragistics.Controls.Charts.OlapXAxis.LayoutArranged() at Infragistics.Controls.Charts.OlapAxis.ArrangeLayoutInternal() at Infragistics.Controls.Charts.OlapAxis.DataSourceChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue) at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation) at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter) at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) at Infragistics.Controls.Charts.OlapAxis.set_DataSource(IOlapViewModel value) at GoIT.Dashboard.Infrastructure.Controls.Charts.DataChartControl.ResolveXAxis(IChartViewModel chartViewModel)
Is there any way how to fix it?
Thank you
Hello Krasimir,
I cannot reproduce this issue anymore.
Thank you for your assistance.
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you for your reply. Looking forward to hearing from you.
Thank you very much for your help. I didn't get a chance to modify the sample application to reproduce the issue. I will let you know as soon as I have some news.