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. Image for the cookie policy date

NullReference settings LabelContent

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

5 Replies

DA Devi Aruna Maharasi Murugan Syncfusion Team 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 



FI Filippo replied to Devi Aruna Maharasi Murugan 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


SS Sheik Syed Abthaheer M Syncfusion Team 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 
  



FI Filippo April 13, 2017 09:42 AM UTC

Thank you!

Regards
Filippo


MK Muneesh Kumar G Syncfusion Team 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. 


Loader.
Live Chat Icon For mobile
Up arrow icon