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

DataVisualization.ChartPropertiesBuilder

Can you please tell me what I am missing. 

 

I keep getting this Compiler Error Message: CS1061: 'Syncfusion.JavaScript.DataVisualization.ChartPropertiesBuilder' does not contain a definition for 'LabelPosition' and no extension method 'LabelPosition' accepting a first argument of type 'Syncfusion.JavaScript.DataVisualization.ChartPropertiesBuilder' could be found (are you missing a using directive or an assembly reference?)
 

on Line 14: .LabelPosition(ChartLabelPosition.OutsideExtended)

 

<div>

 

@(Html.EJ().Chart("container")

.CommonSeriesOptions(options => options.Type(SeriesType.Pie).Marker(marker => marker.DataLabel(label => label.Font(font => font.Color("black").Size("16px").FontFamily("arial")))

.Visible(true)))

.LabelPosition(ChartLabelPosition.OutsideExtended)

 

 

 

.Series(sr =>

{

sr.Points(pt =>

{

pt.X("Labour").Y(28).Text("Labour 28%").Add();

pt.X("Legal").Y(10).Text("Legal, 10%").Add();

pt.X("Production").Y(20).Text("Production, 20%").Add();

pt.X("License").Y(15).Text("License, 15%").Add();

pt.X("Facilities").Y(23).Text("Facilites, 23%").Add();

pt.X("Taxes").Y(17).Text("Taxes, 17%").Add();

pt.X("Insurance").Y(12).Text("Insurance, 12%").Add();

});

}))

</div>

thanks


1 Reply

SK Sanjith Kesavan Syncfusion Team November 18, 2015 04:17 AM UTC

Hi Thomas McShane,

Thanks for contacting Syncfusion support. We have analyzed your code example. We can able to reproduce exact problem while using your code in our sample. LabelPosition is the marker property. But in your code example you have given that outside of the marker. To avoid this problem, please follow the below code example.

[CSHTML]


In the above code we have used LabelPosition property inside the marker. Now the chart is rendering fine. Please find the below screenshot.



We have prepared the sample as per your requirement. Please find the sample from below location.
Sample Link: http://www.syncfusion.com/downloads/support/forum/121185/ze/MVCsample-82302895
Please let us know if you have any concern.

Regards,
Sanjith K.

Loader.
Live Chat Icon For mobile
Up arrow icon