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
close icon

ChartWebControl (Pie) and Legend positioning

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

1 Reply

AD Administrator 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

Loader.
Live Chat Icon For mobile
Up arrow icon