To solve the problem of excessive legend data, use scrolling, but the graphic style changes after doing so.

Foreword:

       Before scrolling:

        After scrolling:

 

Before and after scrolling , except for the two categories of " Urban Planning " and " Urban Management Components ", there are no other changes in the content in the pie chart , and the data has not increased. However, I don't know why the style has changed. . Project requirements : scroll legend and keep graphics consistent.

Solution:

       Add the following code to the echarts instance:

 mycharts.dispatchAction({
   type: 'legendScroll',
})

Guess you like

Origin blog.csdn.net/m0_73334325/article/details/132583078