From e6cad468e0472788ee8de1f51d90082821566237 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Sun, 21 Jan 2018 19:44:08 +0300 Subject: [PATCH] Fixes #152: Different series title sizes not vcentered in the top/bottom legend. --- src/Legend.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Legend.vala b/src/Legend.vala index 8e3753c..3bb6b6d 100644 --- a/src/Legend.vala +++ b/src/Legend.vala @@ -140,7 +140,7 @@ namespace CairoChart { switch (process_type) { case ProcessType.DRAW: var x = legend_x0 + leg_width_sum + (leg_width_sum == 0.0 ? 0.0 : text_hspace); - var y = legend_y0 + leg_height_sum + max_font_heights[heights_idx]; + var y = legend_y0 + leg_height_sum + max_font_heights[heights_idx] / 2.0 + s.title.height / 2.0; // series title chart.ctx.move_to (x + line_length, y);