Articles in this section
Category / Section

How to change legend position in PivotChart?

This KB illustrates that how to change legend position in PivotChart.

Solution

To change the legend position in PivotChart, you can use the position property. Refer to the following code example to achieve the same.

JS

$("#PivotChart1").ejPivotChart({

url: "../wcf/OlapChartService.svc", title: { text: "PivotChart in Essential Studio" }, legend: { visible: true,  position: "top", alignment: "Center" },

});

 

ASP

<ej:PivotChart ID="PivotChart1" runat="server" Url="../wcf/OlapChartService.svc">

<Legend Visible="true" Position="Top" Alignment="Center"/></ej:PivotChart>

 

MVC

@Html.EJ().Pivot().PivotChart("PivotChart1").Url(Url.Content("~/wcf/OlapChartService.svc")).Legend(legend => legend.Visible(true).Position(LegendPosition.Top).Alignment(Syncfusion.JavaScript.DataVisualization.TextAlignment.Center))

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied