I am now making an echarts pie chart, in which the legend is dynamically generated. Sometimes more than a dozen texts are sent to the background, and the style is ugly. Now I want to realize: when the text in a single legend exceeds 8 , automatically turns into an ellipsis of "..." (as shown in the picture below), please give me some advice.
There is a formatter under the legend configuration item
Make a judgment and then use string concatenation.
If the annotation is not displayed on the pie chart, it can be intercepted after the data is transmitted from the background.
Or just format it.