web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Dashboard legend Top, move with scroll

(0) ShareShare
ReportReport
Posted on by 340

Hello,

I created a dashboard with bar charts. The legend however is on the bottom. Is there a way to move the legends to the top and that when we scroll down, the legend follows (like a header) that follows and can we do so for when we enlarge the charts ?

I have the same question (0)
  • LuHao Profile Picture
    40,892 on at

    Hi partner,

    Unfortunately, this is impossible.

    If you want to see this feature in the future, you could suggest this idea to the Microsoft team: experience.dynamics.com/.../

  • Johnseito Profile Picture
    340 on at

    How about just move the legend to the top but not the scroll. This is common, excel has it, we can have it top, left, right or bottom.

  • Verified answer
    LuHao Profile Picture
    40,892 on at

    Hi partner,

    We can do it in the web client, not in the UCI.

    Please refer to this blog: https://social.microsoft.com/Forums/en-US/da1f1a7d-f5d3-4b9a-9ee5-7a7e901fb6b5/forcing-the-chart-legend-to-always-be-at-the-bottom?forum=crm

    1) Export the original chart, open its xml file. 

    pastedimage1571306782287v1.png

    2) Find <Legends> ... </Legends>. Use the following code to replace them.

    <Legends>
         <Legend Alignment="Center" LegendStyle="Table" Docking="Bottom" Font="{0}, 11px" ForeColor="59, 59, 59" Position="5, 90, 20, 10"></Legend>
    </Legends>

    8308.PNG

    3) Import it into D365.

    In this case, you can put the legend to the bottom.

    This method is only available for web client and not for UCI. In UCI, you cannot change the position of the legend.

  • Johnseito Profile Picture
    340 on at

    Great, thanks, with the web client can we make the legend to be on top and also go along with the scroll (like how we freeze pane a row in excel, that top row always stay there and when we go down the page that top row we alway see because it comes down with the scroll) ?

  • Johnseito Profile Picture
    340 on at

    I exported it and made the change to the legend, moving it to the top and the result didn’t change. It was bottom before. Not sure why.

    D0991309_2D00_F56C_2D00_4B21_2D00_B996_2D00_1AFE1CB37DE1.png

  • Suggested answer
    LuHao Profile Picture
    40,892 on at

    Hi partner,

    The code that determines the position of the legend is not Docking="Bottom" or "Top", but Position="5, 90, 20, 10".

    The Position="5, 90, 20, 10" translates as follows, the first number is the distance from the left across the chart in % (0 would be absolute left, 100 absolute right). The second number is the distance from the top in % (so 100 would be at the bottom - I find setting to 100 though makes the legend disappear).

    So if you want to move the legend to the top, then you need to reduce the second number.

    You can write like this: Position="5, 5, 20, 10"

  • Johnseito Profile Picture
    340 on at

    I don’t see position in the xml file or I need to change the docking to position and put those numbers ?

  • Suggested answer
    LuHao Profile Picture
    40,892 on at

    Hi partner,

    If there is no Position="..." in the <Legends> ... </Legends> code block of your XML file, then you can add it manually, as in the screenshot in my reply above.

  • Johnseito Profile Picture
    340 on at

    Actually to my surprise the way I did it eventually work. Putting docking on top. Maybe the last time i didn’t see it because it took time, but I looked at it today, the legend is on top.

    Now how can I format or code it to be on top as I scroll down if this can be done ?

  • LuHao Profile Picture
    40,892 on at

    Hi partner,

    As my first answer, I think this is impossible.

    Also, if my answer is helpful, don't forget to click Yes to mark it as verified.

    pastedimage1571622517416v1.png

    This will help other users quickly navigate to this theme.

    Thanks.  :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 47 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 38 Super User 2025 Season 2

#3
#ManoVerse Profile Picture

#ManoVerse 31

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans