Type 'System.Object' does not have a public property named 'X'

Hello,

I've been trying to get the Chart control working for some time without much luck. Initially I tried to add to an existing project, but I've even tried a new project with no success. Any help would be appreciated :)

I keep getting the following error:

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: Type 'System.Object' does not have a public property named 'X'.

Source Error: 

Line 15: <Marker>
Line 16: <DataLabel MaximumLabelWidth="0">
Line 17: <Offset X="0" Y="0"></Offset>
Line 18: </DataLabel>
Line 19: </Marker>


1 Reply

BP Baby Palanidurai Syncfusion Team April 5, 2018 08:33 AM UTC

Hi Georg Thomas, 


Thanks for using syncfusion products, 

      We have analyzed your query. The offset option in data label  is used to move the labels both vertically and horizontally. By default the horizontal and vertical offset is zero.  Since offset property accepts both double and object value , we can’t use that in aspx page, instead we can change the values for offset in code behind. So please remove the offset value assigned for data label in your sample from aspx page and try to change the value in code behind, if you want to move the label from its default position. 

public partial class ChartFeatures : System.Web.UI.Page 
    { 
        protected void Page_Load(object sender, EventArgs e) 
        { 
           this.Chart1.Series[0].Marker.DataLabel.Offset = 15; 
        } 
    } 


<Marker> 
<DataLabel MaximumLabelWidth="0"> 
</DataLabel> 
</Marker> 


Screenshot: 

 

Sample for your reference can be find from below link, 
 https://www.syncfusion.com/downloads/support/forum/136825/ze/sample1134438294 
Kindly revert as, if you have any concerns. 


Thanks, 
Baby. 


Loader.
Up arrow icon