Hi,
My chart is working fine, but I am unable to figure out how does the chart decide which property to use from my class for the DateTimeAxis. Let me explain.
I have set the series.ItemsSource to a Collection of Custom Objects. Each object has 4 properties ID, Value, RecordDate, ModifiedDate. My question is that when I bind the collection to the chart, and make X Axis to be a DateTimeAxis, how does the chart figure out if it should use the RecordDate or the ModifiedDate on the X-Axis. My code is as follows:.
chart = new SfChart();
chart.VerticalOptions = LayoutOptions.FillAndExpand;
//xaxis
//https://www.syncfusion.com/forums/131901/date-format-datetimeaxis
DateTimeAxis dateTimeAxis = new DateTimeAxis();
dateTimeAxis.Title.Text = "";
dateTimeAxis.LabelStyle.LabelFormat = "dd-MMM-yy";
dateTimeAxis.LabelRotationAngle = 90;
chart.PrimaryAxis = dateTimeAxis;
chart.PrimaryAxis.IsVisible = true;
//Initializing secondary Axis
NumericalAxis secondaryAxis = new NumericalAxis();
series.ItemsSource = customDataList;
chart.SecondaryAxis = secondaryAxis;
chart.SecondaryAxis.IsVisible = true;
series = new LineSeries();
series.XBindingPath = "ID";
series.YBindingPath = "Number";
series.DataMarker = new ChartDataMarker();
series.DataMarker.ShowMarker = true;
series.DataMarker.ShowLabel = true;
series.EnableTooltip = true;
chart.Series.Add(series);
Tx