Can I change the order of the legends in grouped bar chart?

  1. #1

    Can I change the order of the legends in grouped bar chart?

    Can I change the order of the legends as shown?

    Click image for larger version. 

Name:	legend_change.png 
Views:	56 
Size:	34.4 KB 
ID:	25192
  2. #2
    Hello @meka123,

    There's no supported way to arbitrarily change the order of the legend. The way you pointed does not correspond to the data shown in the chart. The chart "zero" point is in the origin (where x and y axes are joined), where January is. Probably what you want to switch is the x-axis/months (which shows as y-axis because the chart is flipped) draw order. For that you would need to adjust the data to feed the chart from December to January.

    Yet, the order of the colors shown are displayed bottom-up in the chart where they are presented top-down in the legend. While this makes sense, there's no supported way to just invert this order. Of course, you can just override or extend the charts methods to make them print it the way you need. The components are highly customizable, but that would require in-depth knowledge of how Ext JS works. You may look for issues with chart legends with provided overrides to get an idea of what's involved in overriding. A starting point would be seeing how overrides helped this issue: Column chart legend not showing correct color incase of merged chart

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] Change color of a bar in column chart
    By jchau in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 25, 2014, 5:36 AM
  2. [CLOSED] Change legend of Bar Chart
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Oct 16, 2013, 11:32 AM
  3. Replies: 4
    Last Post: Mar 13, 2013, 6:10 AM
  4. [CLOSED] Text on Series and Tool tips for Grouped Bar Chart
    By WHISHWORKS in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 16, 2012, 10:59 AM
  5. [CLOSED] Order of grouped gridpanel rows
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Sep 22, 2011, 8:24 PM

Posting Permissions