Forum Discussion
Bug: Legend changes to "(Blank)" when Initial Scroll Position is set to End
Hi eloibf,
Building on the workaround above: if you need both "End" scrolling and custom colours, you can avoid the trigger entirely by not using per-category formatting at all. Per-category colours are stored as selectors on each legend value, and that write is what seems to break with End. Two alternatives that do not create those selectors:
1. Colours from the theme, ordered to match your legend sort:
{
"name": "Legend colours",
"dataColors": ["#1F77B4", "#FF7F0E", "#2CA02C", "#D62728"]
}2. Conditional formatting (fx) on Columns > Colors with a measure, if the colour must follow the category name rather than the order (availability depends on the chart type and whether a legend field is used, so check your visual first):
Category Colour =
SWITCH (
SELECTEDVALUE ( 'Table'[Category] ),
"A", "#1F77B4",
"B", "#FF7F0E",
"C", "#2CA02C",
"D", "#D62728",
"#999999"
)If a visual is already broken, check for and remove the per-category colour overrides (Reset to default on Data colors) before re-applying End. And since you have a clean repro in both Desktop and Service, it is worth posting it on the Fabric Issues / Ideas site or a support case so it gets tracked.
So my overall approach would be:
Reset per-category colours on the affected visual
-> Apply colours via theme dataColors (or fx measure)
-> Set Initial Scroll Position = End
-> Report the repro so the selector bug gets fixedAI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.