Greetings from Syncfusion.
We have analyzed your query and currently we don’t have support for show empty datapoint in Xamarin.Forms SfChart. Already we have logged this as a feature request. You can track the status of this feature from below link
We will prioritize the features every release based on the demands and we don't have an immediate plan to implement this. So, this feature will be available in any of our upcoming releases.
Please cast your vote to make it counts and If you have any more specifications/suggestions to the feature request, you can add it as a comment in the portal.
Also, we would like to suggest that to achieve your requirement “Show spline with empty datapoint” by neglect the datapoint if the datapoint is empty value. Please find the code example below.
CodeSnippet:
|
public class ViewModel
{
public ObservableCollection<Model> Data { get; set; }
public ObservableCollection<Model> SplineData { get; set; }
public ViewModel()
{
Random random = new Random();
var date = new DateTime(2017, 5, 1);
Data = new ObservableCollection<Model>();
for (int i = 0; i < 14; i++)
{
if (i == 3 || i == 10)
{
Data.Add(new Model(date, double.NaN));
}
else
{
Data.Add(new Model(date, random.Next(20, 100)));
}
date = date.AddDays(1);
}
SplineData = new ObservableCollection<Model>();
for (int i = 0; i < Data.Count; i++)
{
if (!double.IsNaN(Data[i].Value))
{
SplineData.Add(Data[i]);
}
}
}
} |
Also, we have attached the complete sample for your reference. Please find the sample from the below link.
Output:
Please let us know if you have any concern.
Regards,
Yuvaraj.