BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
protected override void OnElementChanged(ElementChangedEventArgs<SfChart> e)
{
base.OnElementChanged(e);
if (Control != null)
{
foreach (var series in Control.Series)
{
series.ShowEmptyPoints = true;
series.EmptyPointValue = Syncfusion.UI.Xaml.Charts.EmptyPointValue.Average;
}
}
} |
Hi Jonathan,Thanks for your feedback.By considering the empty point use cases, we have exposed the API in ChartSegment called Empty to know whether the value of the segment is empty. As of now, this property is available in native chart, so you need to write custom renderer to modify the empty points as per your need. We have prepared a sample to show the average value at empty point indexes, please download the sample from below location.In UWP we can achieve your requirement by setting ShowEmptyPoints property in in CustomRenderer as per the below code snippet.Code snippet [C#]:
protected override void OnElementChanged(ElementChangedEventArgs<SfChart> e){base.OnElementChanged(e);if (Control != null){foreach (var series in Control.Series){series.ShowEmptyPoints = true;series.EmptyPointValue = Syncfusion.UI.Xaml.Charts.EmptyPointValue.Average;}}}Please let us know if you need any further assistance.Regards,Divya Venkatesan
protected override void CreateSegments()
{
base.CreateSegments();
foreach (var segment in this.Segments)
{
PropertyInfo emptyInfo = typeof(ChartSegment).GetProperty("Empty", BindingFlags.NonPublic | BindingFlags.Instance);
bool isEmpty = (bool)emptyInfo.GetValue(segment, null);
if (isEmpty == true)
{
isEmpty = !isEmpty;
emptyInfo.SetValue(segment, isEmpty);
HandleEmpltyPoints(segment as LineSegment);
}
}
} |
public override void CreateSegments()
{
base.CreateSegments();
foreach (var segment in this.Segments)
{
if (segment.Empty == true)
{
segment.Empty = !segment.Empty;
HandleEmpltyPoints(segment as SFLineSegment);
}
}
} |