OK In progress...

This commit is contained in:
Kolan Sh 2018-01-23 17:01:47 +03:00
parent f844b70f26
commit 63346514fd
1 changed files with 8 additions and 13 deletions

View File

@ -500,7 +500,10 @@ namespace CairoChart {
var ctx = chart.ctx; var ctx = chart.ctx;
for (Float128 v = min, max = range.zmax; Math.point_belong (v, min, max); v += step) { for (Float128 v = min, max = range.zmax; Math.point_belong (v, min, max); v += step) {
if (is_x && chart.joint_x || !is_x && chart.joint_y) chart.color = chart.joint_color; if (is_x && chart.joint_x || !is_x && chart.joint_y) {
chart.color = chart.joint_color;
ser.grid.style.color = Color(0, 0, 0, 0.5);
}
else chart.color = color; else chart.color = color;
string text = "", time_text = ""; string text = "", time_text = "";
switch (dtype) { switch (dtype) {
@ -529,9 +532,7 @@ namespace CairoChart {
break; break;
} }
// 6. Draw grid lines to the ser.axis_y.place.zmin. // 6. Draw grid lines to the ser.axis_y.place.zmin.
var grid_style = ser.grid.style; ser.grid.style.apply(chart);
if (chart.joint_x) grid_style.color = Color(0, 0, 0, 0.5);
grid_style.apply(chart);
double y = chart.evarea.y1 - max_rec_size - font.vspacing - (title.text == "" ? 0 : title.height + font.vspacing); double y = chart.evarea.y1 - max_rec_size - font.vspacing - (title.text == "" ? 0 : title.height + font.vspacing);
ctx.move_to (scr_v, y); ctx.move_to (scr_v, y);
if (chart.joint_x) if (chart.joint_x)
@ -545,9 +546,7 @@ namespace CairoChart {
compact_rec_pos (v, text_t)); compact_rec_pos (v, text_t));
text_t.show(); text_t.show();
// 6. Draw grid lines to the ser.axis_x.place.zmin. // 6. Draw grid lines to the ser.axis_x.place.zmin.
var grid_style = ser.grid.style; ser.grid.style.apply(chart);
if (chart.joint_y) grid_style.color = Color(0, 0, 0, 0.5);
grid_style.apply(chart);
double x = chart.evarea.x0 + max_rec_size + font.hspacing + (title.text == "" ? 0 : title.width + font.hspacing); double x = chart.evarea.x0 + max_rec_size + font.hspacing + (title.text == "" ? 0 : title.width + font.hspacing);
ctx.move_to (x, scr_v); ctx.move_to (x, scr_v);
if (chart.joint_y) if (chart.joint_y)
@ -575,9 +574,7 @@ namespace CairoChart {
break; break;
} }
// 6. Draw grid lines to the ser.axis_y.place.zmax. // 6. Draw grid lines to the ser.axis_y.place.zmax.
var grid_style = ser.grid.style; ser.grid.style.apply(chart);
if (chart.joint_x) grid_style.color = Color(0, 0, 0, 0.5);
grid_style.apply(chart);
double y = chart.evarea.y0 + max_rec_size + font.vspacing + (title.text == "" ? 0 : title.height + font.vspacing); double y = chart.evarea.y0 + max_rec_size + font.vspacing + (title.text == "" ? 0 : title.height + font.vspacing);
ctx.move_to (scr_v, y); ctx.move_to (scr_v, y);
if (chart.joint_x) if (chart.joint_x)
@ -591,9 +588,7 @@ namespace CairoChart {
compact_rec_pos (v, text_t)); compact_rec_pos (v, text_t));
text_t.show(); text_t.show();
// 6. Draw grid lines to the ser.axis_x.place.zmax. // 6. Draw grid lines to the ser.axis_x.place.zmax.
var grid_style = ser.grid.style; ser.grid.style.apply(chart);
if (chart.joint_y) grid_style.color = Color(0, 0, 0, 0.5);
grid_style.apply(chart);
double x = chart.evarea.x1 - max_rec_size - font.hspacing - (title.text == "" ? 0 : title.width + font.hspacing); double x = chart.evarea.x1 - max_rec_size - font.hspacing - (title.text == "" ? 0 : title.width + font.hspacing);
ctx.move_to (x, scr_v); ctx.move_to (x, scr_v);
if (chart.joint_y) if (chart.joint_y)