         }
     }
     
+    open func calcWidth(span: CGFloat) -> CGFloat
+    {
+        var width = CGFloat(60.0)
+        if (span < 240) { //z0
+            width = 60;
+        } else if (span < 1200) { //z1
+            width = 240;
+        } else if (span < 10000) { //z2
+            width = 960;
+        } else if (span < 80000) { //z3
+            width = 4800*3;
+        } else { //z4
+            width = 15360*2;
+        }
+        return width;
+    }
+    
+    
     fileprivate func prepareBuffer(dataSet: IBarChartDataSet, index: Int)
     {
         guard

                }
                
                barRect.origin.x = left
                barRect.size.width = right - left
                barRect.origin.y = top
                barRect.size.height = bottom - top
                

        
        rect.origin.x = CGFloat(left)
        rect.origin.y = CGFloat(top)
        
        let span = right - left;
        let width = calcWidth(span: CGFloat(span))
        
        rect.size.width = CGFloat(width) //right - left
        rect.size.height = CGFloat(bottom - top)
        
        trans.rectValueToPixel(&rect, phaseY: animator?.phaseY ?? 1.0)
