Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Label can't display when ECharts label's length is too long

I just use the treemap type of EChart to show the data. But I meet a problem. And the label option shows as the following: itemStyle:{ normal:{ label:{ show :true, formtter:"{b}"}

If my data name's length is too long(maybe more than 60 characters), the label doesn't show on the Treemap. The Name will show on the tooltip. Why? How can I solve this problem? Thanks !

like image 584
Calla Avatar asked Aug 01 '16 07:08

Calla


1 Answers

Try to set the grid as below,

grid: { containLabel: true },

This will adjust your chart label.

like image 198
Tekson Avatar answered Nov 02 '22 09:11

Tekson