Loading

Salesforce Dashboard: Legend Colors and Sort Order Are Inconsistent Across Components

Julkaisupäivä: Aug 18, 2026
Kuvaus

In Salesforce Lightning Dashboards, chart legend ordering is not guaranteed when the grouping field is a picklist or formula field. The following scenarios illustrate common manifestations of this behavior:

  • The order of the legend on a stacked bar chart is different from Classic in Lightning and does not match that of the source report — this happens even though the dashboard component is set to "Use chart settings from report."
  • The legend in a dashboard chart is sorted incorrectly when the picklist value is translated to a non-English language.
Ratkaisu

This article explains why chart legend order and colors can be inconsistent across dashboard components in Salesforce.

Why This Happens

This is expected behavior — Salesforce doesn't guarantee sort order in the chart legend. Lightning Dashboards are not designed to respect field-type ordering like picklists and formulas, and this behavior can vary across languages when picklist values are translated. The rendering engine sorts legend values at display time based on the data itself, not the field's metadata configuration.

Workaround / Feature Request

There is currently no supported way to force legend ordering to match report or picklist metadata order. You can upvote the related feature request here.

Knowledge-artikkelin numero

000394299

 
Ladataan
Salesforce Help | Article