Ignore:
Timestamp:
Nov 17, 2010 1:44:52 PM (13 years ago)
Author:
fenix
Message:

fixed bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.analytics/trunk/quintagroup/analytics/browser/views.py

    r2999 r3021  
    8888            data.append(self.getContent(type_)) 
    8989        other = [self.getContent(t) for t in self.getTypes(all=True)[self.MAX:]] 
    90         data.append([sum(l) for l in zip(*other)]) 
     90        if other: 
     91            data.append([sum(l) for l in zip(*other)]) 
    9192        max_value = max(self.getTotal()) 
    9293        chart = VerticalBarStack(data, encoding='text') 
    93         chart.title('Content ownership by type').legend(*(types+OTHER_TYPES)) 
     94        types = other and types+OTHER_TYPES or types 
     95        chart.title('Content ownership by type').legend(*(types)) 
    9496        chart.bar('a', 10, 0).legend_pos("b") 
    9597        chart.color(*COLORS) 
Note: See TracChangeset for help on using the changeset viewer.