From 7cb09a99e82e43e57d041d40fbd339703fa87b22 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Tue, 23 Jan 2018 17:40:37 +0300 Subject: [PATCH] OK In progress... --- src/Axis.vala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Axis.vala b/src/Axis.vala index b1b0cfa..798fdf5 100644 --- a/src/Axis.vala +++ b/src/Axis.vala @@ -510,6 +510,7 @@ namespace CairoChart { var text_t = new Text(chart, text, font, color); var tthv = title.text == "" ? 0 : title.height + font.vspacing; var ttwh = title.text == "" ? 0 : title.width + font.hspacing; + var dtf = (date_format == "" ? 0 : text_t.height + font.vspacing); switch (position) { case Axis.Position.LOW: if (is_x) { @@ -520,7 +521,7 @@ namespace CairoChart { case Axis.DType.DATE_TIME: if (date_format != "") text_t.show(); var time_text_t = new Text(chart, time_text, font, color); - chart.ctx.move_to (compact_rec_pos (v, time_text_t), print_y - (date_format == "" ? 0 : text_t.height + font.vspacing)); + chart.ctx.move_to (compact_rec_pos (v, time_text_t), print_y - dtf); if (time_format != "") time_text_t.show(); break; } @@ -551,7 +552,7 @@ namespace CairoChart { case Axis.DType.DATE_TIME: if (date_format != "") text_t.show(); var time_text_t = new Text(chart, time_text, font, color); - chart.ctx.move_to (compact_rec_pos (v, time_text_t), print_y - (date_format == "" ? 0 : text_t.height + font.vspacing)); + chart.ctx.move_to (compact_rec_pos (v, time_text_t), print_y - dtf); if (time_format != "") time_text_t.show(); break; }