cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

how to add padding for legend in linechart

JB_10252176
3-Newcomer

how to add padding for legend in linechart

I would like to add padding to the legend in linechart by adding custom CSS but unable to add it.

 

ACCEPTED SOLUTION

Accepted Solutions
abjain
15-Moonstone
(To:JB_10252176)

@JB_10252176 : If you give a CustomClass property for line chart lets say: 'abline' , then you can apply custom CSS till the selected div in below screenshot.

abjain_0-1655706313965.png

 

We cannot go inside the highlighted div and add custom CSS for individual legends as they will be at sub-part "item" . So you can give custom CSS like this:

.abline ptcs-chart-line::part(chart-layout)::part(legend){
padding:200px
}

This will apply padding to the whole legends area in the line chart.

 

 

View solution in original post

1 REPLY 1
abjain
15-Moonstone
(To:JB_10252176)

@JB_10252176 : If you give a CustomClass property for line chart lets say: 'abline' , then you can apply custom CSS till the selected div in below screenshot.

abjain_0-1655706313965.png

 

We cannot go inside the highlighted div and add custom CSS for individual legends as they will be at sub-part "item" . So you can give custom CSS like this:

.abline ptcs-chart-line::part(chart-layout)::part(legend){
padding:200px
}

This will apply padding to the whole legends area in the line chart.

 

 

Announcements


Top Tags