@@ -637,6 +637,7 @@ def _draw_pie_charts(self, sizes):
637637 def _draw_colored_circles (self , sizes ):
638638 fx , fy = self ._grid_factors
639639 color_column = self ._get_color_column ()
640+ qcolors = self .colors .qcolors_w_nan
640641 for y in range (self .size_y ):
641642 for x in range (self .size_x - self .hexagonal * (y % 2 )):
642643 r = sizes [x , y ]
@@ -648,10 +649,10 @@ def _draw_colored_circles(self, sizes):
648649 if len (color_dist ) != len (members ):
649650 self .Warning .missing_colors (self .attr_color .name )
650651 bc = np .bincount (color_dist , minlength = len (self .colors ))
651- color = self . colors [np .argmax (bc )]
652+ color = qcolors [np .argmax (bc )]
652653 ellipse = ColoredCircle (r / 2 , color , np .max (bc ) / len (members ))
653654 ellipse .setPos (x + (y % 2 ) * fx , y * fy )
654- ellipse .setToolTip (self ._tooltip (self . colors , bc ))
655+ ellipse .setToolTip (self ._tooltip (qcolors , bc ))
655656 self .elements .addToGroup (ellipse )
656657
657658 def redraw_grid (self ):
@@ -863,7 +864,7 @@ def create_legend(self):
863864
864865 items = []
865866 size = 8
866- for name , color in zip (names , self .colors ):
867+ for name , color in zip (names , self .colors . qcolors ):
867868 item = QGraphicsItemGroup ()
868869 item .addToGroup (
869870 CanvasRectangle (None , - size / 2 , - size / 2 , size , size ,
0 commit comments