OK In progress...

This commit is contained in:
Kolan Sh 2018-01-23 17:40:37 +03:00
parent 72c2be67d4
commit 7cb09a99e8
1 changed files with 3 additions and 2 deletions

View File

@ -510,6 +510,7 @@ namespace CairoChart {
var text_t = new Text(chart, text, font, color); var text_t = new Text(chart, text, font, color);
var tthv = title.text == "" ? 0 : title.height + font.vspacing; var tthv = title.text == "" ? 0 : title.height + font.vspacing;
var ttwh = title.text == "" ? 0 : title.width + font.hspacing; var ttwh = title.text == "" ? 0 : title.width + font.hspacing;
var dtf = (date_format == "" ? 0 : text_t.height + font.vspacing);
switch (position) { switch (position) {
case Axis.Position.LOW: case Axis.Position.LOW:
if (is_x) { if (is_x) {
@ -520,7 +521,7 @@ namespace CairoChart {
case Axis.DType.DATE_TIME: case Axis.DType.DATE_TIME:
if (date_format != "") text_t.show(); if (date_format != "") text_t.show();
var time_text_t = new Text(chart, time_text, font, color); 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(); if (time_format != "") time_text_t.show();
break; break;
} }
@ -551,7 +552,7 @@ namespace CairoChart {
case Axis.DType.DATE_TIME: case Axis.DType.DATE_TIME:
if (date_format != "") text_t.show(); if (date_format != "") text_t.show();
var time_text_t = new Text(chart, time_text, font, color); 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(); if (time_format != "") time_text_t.show();
break; break;
} }