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

Legend display management information missing

Hi,

I am displaying a PieChart with 2 series. 

I would like to know:
 1/ how to customize the legend color text for each of them 
 2/ how to make them align in one row

About the text color i have seen that in the documentation:

About the alignement, i have seen that in the documentation:

Unfortunatly it don't works, moreover i have seen anything in the documentation here about it:







Attachment: Pie_Chart_Wrong_display_c6914331.7z

1 Reply

BP Baby Palanidurai Syncfusion Team May 22, 2019 08:57 AM UTC

Hi Marc, 
 
Greetings from Syncfusion. 
 
Query #1: How to customize the legend color text for each of them?  
We have analysed your query. We can attain your requirement using textStyle object property of legend. Using this property we can change the color of the legend text commonly. Please find below code snippet, 
 
Code Snippet: 
public legendSettings: Object = { 
        visible: true, position: 'Top',  
        textStyle:{ color:'white' }, 
   }; 
 
 
Query #2: How to make them align in one row? 
Based on available size width and height the legends are placed in single or multiple row. If you want to show legend in one row then you will increase width of the chart or decrease the legendSettings height. When we decrease legend height then the paging  is automatically enabled. We have prepared a sample based on your requirement. Please find below sample and code snippet, 
 
Code Snippet: 
public legendSettings: Object = { 
        visible: true, position: 'Top',  
        textStyle:{ color:'white' },  
        height: '50' 
    }; 
 
Screenshot: 
 
 
 
Hope this helps. 
 
Regards, 
Baby. 


Loader.
Live Chat Icon For mobile
Up arrow icon