             
             for (var i = 0; i < labels.count; i++)
             {
-                var drawingForm = _legend.colors[i] != UIColor.clearColor();
+                var drawingForm = _legend.colors[i] != nil;
                 
                 if (drawingForm)
                 {

            
            for (var i = 0; i < labels.count; i++)
            {
                var drawingForm = _legend.colors[i] != UIColor.clearColor();
                var x = posX;
                
                if (drawingForm)

            
            for (var i = labels.count - 1; i >= 0; i--)
            {
                var drawingForm = _legend.colors[i] != nil;
                
                if (direction == .RightToLeft && drawingForm)
                {
