Legend performance in all charts

I have a UI where the user can choose any chart type. If there are like 1000 data points and the user chooses a pie chart, the legends take up so long to load and the UI hangs because of too many text objects. Is there a way to improve the performance of the legend rendering? Or can we render only the first 100 legend labels or something like that?