Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello eveyone ,
This is my chart and I would ideally want to reverse the order of the the legend so that it aligns to the graph plots. Does anyone know a way to do that?
Thanks in advance.
Solved! Go to Solution.
Hi @Anonymous ,
I this visuals there is a responsive action so when you resize the chart the legend is reduce.
Taking into account that your data is based on columns of your table you can create a separate table with the following format.
Category | ID | Color |
SCS | 1 | #1A51FF |
EQ | 2 | #F2C80F |
HU | 3 | #00FF1A |
The colour should match the colour codes you have on your visual, then sort the category by the ID column, add the category to a table visual.
Add the following measure to your table visual:
Marker = "●"
Now do a condittional formatting based on the color of the previous table.
Also blakn out the table headers, the gridlines and remove the totals, final result is below.
Check the PBIX file attach.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
The legend order is connected to the order of the information you place in your visuals so if the first value is EQ then this will be the first value on your legend, there is no separate ordering for legend purposes, a work waroundis to create a new chart with the reverse order and then reduce the size of it to the maximum until you see only the legend in this option disable the X and Y axis also.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsWhen you say "reduce the size" do you mean literally? Cause reducing the size changes the size of both the chart and the legend (as opposed to crop like functionality).
Could you elaborate if possible? Thanks
P.S I tried to create a "no duplicates" table of the variables, but this does not allow me to change the order of the legend display.
P.P.S Please note that the values "EQ", "HU", etc. are separate columns in the tab;e behind the chart.
Thanks for your help!
Best,
Rasul
Hi @Anonymous ,
I this visuals there is a responsive action so when you resize the chart the legend is reduce.
Taking into account that your data is based on columns of your table you can create a separate table with the following format.
Category | ID | Color |
SCS | 1 | #1A51FF |
EQ | 2 | #F2C80F |
HU | 3 | #00FF1A |
The colour should match the colour codes you have on your visual, then sort the category by the ID column, add the category to a table visual.
Add the following measure to your table visual:
Marker = "●"
Now do a condittional formatting based on the color of the previous table.
Also blakn out the table headers, the gridlines and remove the totals, final result is below.
Check the PBIX file attach.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |