Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to adjust Legend the same as the Axis

Hi guys,

 

I'm really stuck here & do not know to adjust it. My data & selection is as below:

 

Among those, Horizontal axis list out all the product. Vertical axis is with value only (here is OSF). Legend should be month (time series)

 

Is there anyway that I keep all the month within one product group the same color like below?

 

It's like all the month in the same product having the same color

 

Look forward to any recommendation. Thanks guys!!!

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous,

    You can move the legend field to the axis field as a sub-axis and duplicate raw axis to the legend field, then your chart graph will be re-grouped based on legend.

    Regards,

    Xiaoxin Sheng

6 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amitchandak ,

       

      I tried & it worked as well!! However, just wondering do you have any options to clear concatenate label? My label seems really mixed up as below:

       

      https://ibb.co/c16tQFp

       

      Any recommendation? Thanks

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

    You can move the legend field to the axis field as a sub-axis and duplicate raw axis to the legend field, then your chart graph will be re-grouped based on legend.

    Regards,

    Xiaoxin Sheng

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Xiaoxin,

       

      Thank you a lot for your solution!! However, it seems that the width between columns are way too high, do you have any ideas to reduce it? I have tried inner padding & category width as well, but it doesn't seems to work

      https://ibb.co/rvLgzkB

      Do you have any recommendation?

      Thanks

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous,

        This graph should be defined and analyzed by power bi itself and work as expected. If these blank parts removed, power bi should aggregate similar type bars into one instead of split them into different bars.

        If this effect also not suitable for your requirement, you can also consider using script-based visuals(r, python) to manually plot graphs.

        Regards,

        Xiaoxin Sheng