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

Align Legend boxes or place icon on right of label


I currently have an sfchart with 3 rows. I have created a legend for each series and placed it to the left of (outside) the chart. Since the labels are of different lengths, the legends aren't left-side aligned. Is there a way to align the label boxes? Another option is to be able to place the icon to the right of the label, instead of to the left. Is this possible? Thanks!

Attachment: VentMon_b60ea734.zip

1 Reply

DA Devi Aruna Maharasi Murugan Syncfusion Team January 12, 2017 10:04 AM UTC

Hi Sean, 
Thanks for contacting Syncfusion Support. 
Regarding icon to the right of the label 
We can achieve your requirement by setting the ItemTemplate property of chart legend. We have prepared the demo sample based on your requirement for your reference and it can be downloaded from below link, 
Sample: LegendAlignment 
Please refer our UG documentation link to know more about legend customization, 
Regarding Alignment of Legend, 
Since the legend label has different length, we can align them by setting the same Width for all the legend in the legend collection as shown in the below code snippet, 
          <syncfusion:ChartLegend  Width="250" />  
          <syncfusion:ChartLegend Width="250" />                                 
          <syncfusion:ChartLegend  Width="250"/>                                                                                    

Live Chat Icon For mobile
Up arrow icon