diff --git a/chart/charts.py b/chart/charts.py
index ec2a86f..b53ac5a 100644
--- a/chart/charts.py
+++ b/chart/charts.py
@@ -6,10 +6,11 @@
 from GChartWrapper import Line
 from GChartWrapper import constants
 
-from config import CHARTS_IMG_PATH
+from config import cfg_dict
+CHARTS_IMG_PATH = cfg_dict['charts_img_path']
 
 
-COLORS = ["1569C7", "81D8D0", "307D7E", "5CB3FF", "blue", "indigo"]
+COLORS = ["1569C7", "81D8D0", "307D7E", "5CB3FF", "0040FF", "81DAF5"]
 constants.MARKERS += 'E'  # append E marker to available markers
 
 
@@ -19,8 +20,9 @@
     t.start()
 
 
-def render_vertical_bar(title, legend, dataset, width=700, height=400, scale_x=None,
-                        scale_y=None):
+def render_vertical_bar(title, legend, dataset, width=700, height=400,
+                        scale_x=None, scale_y=None, label_x=None,
+                        label_y=None, lines=()):
     """
     Renders vertical bar group chart
 
@@ -29,7 +31,7 @@
     :param dataset - list of values for each type (value, deviation)
         Example:
             [
-                [(10,(9,11)), (11, (3,12)), (10,(9,11))], # bar1 values
+                [(10,1), (11, 2), (10,1)], # bar1 values
                 [(30,(29,33)),(35,(33,36)), (30,(29,33))], # bar2 values
                 [(20,(19,21)),(20,(13, 24)), (20,(19,21))] # bar 3 values
             ]
@@ -68,27 +70,49 @@
         # deviations.extend(zip(*dev))
         deviations.extend(zip(*display_dev))
 
-    bar.dataset(values + deviations, series=len(values))
+    # bar.dataset(values + deviations, series=len(values))
+    bar.dataset(values + deviations + [l[0] for l in lines], series=len(values))
     bar.axes.type('xyy')
-    bar.axes.label(2, None, 'Kbps')
+    bar.axes.label(2, None, label_x)
     if scale_x:
         bar.axes.label(0, *scale_x)
 
-    max_value = (max([max(l) for l in values + deviations]))
+    max_value = (max([max(l) for l in values + deviations + [lines[1][0]]]))
     bar.axes.range(1, 0, max_value)
     bar.axes.style(1, 'N*s*')
     bar.axes.style(2, '000000', '13')
 
-    bar.scale(0, max_value)
+    bar.scale(*[0, max_value] * len(values + deviations))
 
     bar.bar('r', '.1', '1')
-    for i in range(len(legend)):
+    for i in range(1):
         bar.marker('E', '000000', '%s:%s' % ((len(values) + i*2), i),
                    '', '1:10')
-    bar.legend(*legend)
-    bar.color(*COLORS[:len(values)])
+    bar.color(*COLORS)
     bar.size(width, height)
 
+    axes_type = "xyy"
+
+    scale = [0, max_value] * len(values + deviations)
+    if lines:
+        line_n = 0
+        for data, label, axe, leg in lines:
+            bar.marker('D', COLORS[len(values) + line_n],
+                       (len(values + deviations)) + line_n, 0, 3)
+            max_val_l = max(data)
+            if axe:
+                bar.axes.type(axes_type + axe)
+                bar.axes.range(len(axes_type), 0, max_val_l)
+                bar.axes.style(len(axes_type), 'N*s*')
+                bar.axes.label(len(axes_type) + 1, None, label)
+                bar.axes.style(len(axes_type) + 1, '000000', '13')
+                axes_type += axe
+                line_n += 1
+            legend.append(leg)
+            scale += [0, max_val_l]
+
+    bar.legend(*legend)
+    bar.scale(*scale)
     img_name = hashlib.md5(str(bar)).hexdigest() + ".png"
     img_path = os.path.join(CHARTS_IMG_PATH, img_name)
     if not os.path.exists(img_path):
@@ -111,7 +135,6 @@
     line.color(*COLORS[:len(legend)])
     line.size(width, height)
 
-
     img_name = hashlib.md5(str(line)).hexdigest() + ".png"
     img_path = os.path.join(CHARTS_IMG_PATH, img_name)
     if not os.path.exists(img_path):
