Bar chart label size

Whether it is possible to block that the label affects the size of the chart?

When the primaryXAxis has setting labelIntersectAction: 'MultipleRows',, the chart is automatically smaller.

I have two bar charts next to each other and one has more elements and they are not equal because the labels reduce this one.


4 Replies

DG Durga Gopalakrishnan Syncfusion Team August 19, 2021 03:15 PM UTC

Hi Lom, 

Greetings from Syncfusion. 

By default, 80% of space will be allocated for chart rendering and 20% will be allocated for legend from available space. As per your scenario, when legend size is more, the paging will be enabled automatically to view the legends. If you are still facing problem, we suggest you to specify height or width for legend based on its position. Please check with the below sample and screenshots. 

public legendSettings: Object = { 
        visible: true, 
        position: 'Bottom', 
        width: "40%" 
    }; 


 


Kindly revert us if you have any concerns. 

Regards, 
Durga G 



LO lom August 20, 2021 06:39 AM UTC

Thank you for the answer and in the case of the legend I managed to set a fixed height while in the case of a bar chart where it is not a legend is a problem but labels under the chart?




DG Durga Gopalakrishnan Syncfusion Team August 23, 2021 12:28 PM UTC

Hi Lom, 

We request you to specify labelIntersectAction as Trim or Hide for x axis, to view both chart axis labels in same height. Please check with the below sample and snippet. 

public primaryXAxis: Object = { 
        labelIntersectAction: 'Trim' 
    }; 


 



Kindy revert us if you have any concerns. 

Regards,  
Durga G


DG Durga Gopalakrishnan Syncfusion Team August 25, 2021 03:52 PM UTC

Hi Lom, 

As of now, we don’t have option to specify size for chart area alone, we can only able to customize height and width of whole chart. So, we request you to specify the size for axis labels to achieve your required scenario. Please check with the below sample and screenshot. 

public primaryXAxis: Object = { 
        labelIntersectAction: 'None', 
        labelStyle:{size: '11px'} 
    }; 


 


Kindly revert us if you have any concerns. 

Regards, 
Durga G 


Loader.
Up arrow icon