You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a chart includes a legend with a very large number of entries, the performance is poor and often the chart fails to render at all. A legend with dozens or hundreds of entries is unlikely to be useful to chart viewers, but it is difficult to prevent in cases where end-users are dynamically creating charts from their own data.
It would be good if Vega could provide better performance even for poorly encoded charts - possibly by having a hard or user-controllable limit of the number of legend entries to display. I noticed that the legend's values attribute lets you define specific values to display, but I couldn't find any way to only show (say) the first 30 items and then stop rendering any more.
Example spec which fails to render due to the large number of legend items:
Thanks for the suggestion! I've updated Vega to support a symbolLimit property (default 30) for limiting the number of entries shown. If the limit is exceeded, the last legend entry shows an indicator of the missing entries (e.g., "...15 entries"). This change will be included in the 5.7.0 release.
When a chart includes a legend with a very large number of entries, the performance is poor and often the chart fails to render at all. A legend with dozens or hundreds of entries is unlikely to be useful to chart viewers, but it is difficult to prevent in cases where end-users are dynamically creating charts from their own data.
It would be good if Vega could provide better performance even for poorly encoded charts - possibly by having a hard or user-controllable limit of the number of legend entries to display. I noticed that the legend's
values
attribute lets you define specific values to display, but I couldn't find any way to only show (say) the first 30 items and then stop rendering any more.Example spec which fails to render due to the large number of legend items:
The text was updated successfully, but these errors were encountered: