OK In progress...

This commit is contained in:
Kolan Sh 2018-01-23 17:45:47 +03:00
parent 7cb09a99e8
commit c4b3002913
1 changed files with 5 additions and 5 deletions

View File

@ -509,7 +509,7 @@ namespace CairoChart {
var scr_v = scr_pos (v);
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 ttwh = title.text == "" ? 0 : title.width + font.hspacing; ttwh += font.hspacing;
var dtf = (date_format == "" ? 0 : text_t.height + font.vspacing);
switch (position) {
case Axis.Position.LOW:
@ -533,11 +533,11 @@ namespace CairoChart {
else chart.ctx.line_to (scr_v, double.min (y, chart.plarea.y0 + chart.plarea.height * (1 - ser.axis_y.place.zmax)));
break;
} else {
chart.ctx.move_to (chart.evarea.x0 + max_rec_size - text_t.width + font.hspacing + ttwh, compact_rec_pos (v, text_t));
chart.ctx.move_to (chart.evarea.x0 + max_rec_size - text_t.width + ttwh, compact_rec_pos (v, text_t));
text_t.show();
// 6. Draw grid lines to the ser.axis_x.place.zmin.
ser.grid.style.apply(chart);
double x = chart.evarea.x0 + max_rec_size + font.hspacing + ttwh;
double x = chart.evarea.x0 + max_rec_size + ttwh;
chart.ctx.move_to (x, scr_v);
if (chart.joint_y) chart.ctx.line_to (chart.plarea.x1, scr_v);
else chart.ctx.line_to (double.max (x, chart.plarea.x0 + chart.plarea.width * ser.axis_x.place.zmax), scr_v);
@ -564,11 +564,11 @@ namespace CairoChart {
else chart.ctx.line_to (scr_v, double.max (y, chart.plarea.y0 + chart.plarea.height * (1 - ser.axis_y.place.zmin)));
break;
} else {
chart.ctx.move_to (chart.evarea.x1 - text_t.width - font.hspacing - ttwh, compact_rec_pos (v, text_t));
chart.ctx.move_to (chart.evarea.x1 - text_t.width - ttwh, compact_rec_pos (v, text_t));
text_t.show();
// 6. Draw grid lines to the ser.axis_x.place.zmax.
ser.grid.style.apply(chart);
double x = chart.evarea.x1 - max_rec_size - font.hspacing - ttwh;
double x = chart.evarea.x1 - max_rec_size - ttwh;
chart.ctx.move_to (x, scr_v);
if (chart.joint_y) chart.ctx.line_to (chart.plarea.x0, scr_v);
else chart.ctx.line_to (double.min (x, chart.plarea.x0 + chart.plarea.width * ser.axis_x.place.zmin), scr_v);