The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I m not able to reposition the ChartLegend when the series added to the control is of type "Pie" in CHARTWEBCONTROL,
When I say the following lines in the "InitializeChartData" method
{
chartControl1.Legend.Width = 50;
chartControl1.Legend.Left = 20;
chartControl1.Legend.Height = 70;
}
i m expecting the legend to be shown at the top left corner, but the legend shown actually has its own height and own width irrespective of the width and height that I have mentioned, nither it respects the location I have mentioned and it comes up at the Top-Right Position.
Can any one help me by providing a sample code to show up the legend at a custom position.
Thanks,Bubu
ADAdministrator Syncfusion Team November 29, 2005 10:33 AM UTC
Hi Bubu,
1)Using LegendAlignment property, you could show the Legend at the top left corner. The following code snippet illustrates this.
this.ChartWebControl1.Legend.Position=ChartLegendPosition.Top;
this.ChartWebControl1.Legend.LegendAlignment=System.Drawing.StringAlignment.Near;
2)Depending upon the ItemSize, the LegendSize will be minimized or maximized. This can be done using ItemSize property of the ChartWebControl.
Regarding custom positioning of Legend, it is a known issue that has been internally fixed in the latest version. It will be publicly available in the latest version 4.0 due in another two weeks.
Thanks for your continued interest in Syncfusion products.
Regards,
F.Rashidha