             
             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, count = labels.count; i < count; i++)
            {
                var drawingForm = _legend.colors[i] != UIColor.clearColor();
                
                if (drawingForm)
                {

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