We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

NullReference settings LabelContent

Thread ID:

Created:

Updated:

Platform:

Replies:

129904 Apr 8,2017 03:36 PM UTC Apr 14,2017 07:37 AM UTC Xamarin.Forms 5
loading
Tags: SfChart
Filippo
Asked On April 8, 2017 03:36 PM UTC

trying to set LabelContent property causes a NullReferenceException during the chart rendering on UWP platform.
It seems work correctly on Android and iOS.

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On April 10, 2017 11:49 AM UTC

Hi Filippo, 
  
Thanks for contacting Syncfusion Support. 
  
We have tried to reproduce the reported problem at our end. But we are unable to reproduce the reported problem. 
  
We have prepared a demo sample for your reference and it can be downloaded from below link, 
  
  
If you are still able to reproduce the reported problem, please revert us by modifying the provided sample. It would be helpful for us to serve you better. 
  
Regards, 
Devi 


Filippo
Replied On April 12, 2017 10:07 AM UTC

Hi Filippo, 
  
Thanks for contacting Syncfusion Support. 
  
We have tried to reproduce the reported problem at our end. But we are unable to reproduce the reported problem. 
  
We have prepared a demo sample for your reference and it can be downloaded from below link, 
  
  
If you are still able to reproduce the reported problem, please revert us by modifying the provided sample. It would be helpful for us to serve you better. 
  
Regards, 
Devi 


Hi Devi,
I have modified the project so as to be like mine and I was able to reproduce the issue.
I use XAML binding and guess the error depends from this.

Regards
Filippo

Attachment: LabelContent129904_a62e4c3.zip

Sheik Syed Abthaheer M [Syncfusion]
Replied On April 13, 2017 07:06 AM UTC

Hi Filippo,

Thanks for you update.

We have analyzed your provided sample and the exception thrown due to wrongly defined the LabelStyle property in ChartDataMarker. To apply the label style for data marker, we have to use DataMarkerLabelStyle as shown in below code.

 
XAML: 
<chart:ChartDataMarker LabelContent="YValue"> 
                      <chart:ChartDataMarker.LabelStyle> 
                        <chart:DataMarkerLabelStyle LabelPosition="Auto"></chart:DataMarkerLabelStyle> 
                      </chart:ChartDataMarker.LabelStyle> 
                    </chart:ChartDataMarker> 
                </chart:ColumnSeries.DataMarker> 
 
  
Output :  

Please find the modified sample in below location.

Sample: LabelContent129904 

Please refer the below UG link for setting label style for ChartDataMarker.

Link : https://help.syncfusion.com/xamarin/sfchart/datamarker?cs-save-lang=1&cs-lang=xaml#label-position  

Regards,
M.Sheik 
  


Filippo
Replied On April 13, 2017 09:42 AM UTC

Thank you!

Regards
Filippo

Muneesh Kumar G [Syncfusion]
Replied On April 14, 2017 07:37 AM UTC

Hi Filippo,  
You are welcome. 
 
Please let us know if you need any other assistance on this. 
 
Regards, 
Muneesh Kumar G. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;