@@ -637,6 +637,7 @@ def _draw_pie_charts(self, sizes):
637
637
def _draw_colored_circles (self , sizes ):
638
638
fx , fy = self ._grid_factors
639
639
color_column = self ._get_color_column ()
640
+ qcolors = self .colors .qcolors_w_nan
640
641
for y in range (self .size_y ):
641
642
for x in range (self .size_x - self .hexagonal * (y % 2 )):
642
643
r = sizes [x , y ]
@@ -648,10 +649,10 @@ def _draw_colored_circles(self, sizes):
648
649
if len (color_dist ) != len (members ):
649
650
self .Warning .missing_colors (self .attr_color .name )
650
651
bc = np .bincount (color_dist , minlength = len (self .colors ))
651
- color = self . colors [np .argmax (bc )]
652
+ color = qcolors [np .argmax (bc )]
652
653
ellipse = ColoredCircle (r / 2 , color , np .max (bc ) / len (members ))
653
654
ellipse .setPos (x + (y % 2 ) * fx , y * fy )
654
- ellipse .setToolTip (self ._tooltip (self . colors , bc ))
655
+ ellipse .setToolTip (self ._tooltip (qcolors , bc ))
655
656
self .elements .addToGroup (ellipse )
656
657
657
658
def redraw_grid (self ):
@@ -863,7 +864,7 @@ def create_legend(self):
863
864
864
865
items = []
865
866
size = 8
866
- for name , color in zip (names , self .colors ):
867
+ for name , color in zip (names , self .colors . qcolors ):
867
868
item = QGraphicsItemGroup ()
868
869
item .addToGroup (
869
870
CanvasRectangle (None , - size / 2 , - size / 2 , size , size ,
0 commit comments