Fixes #146: Draw grid optimizations made.

This commit is contained in:
Kolan Sh 2018-02-20 17:33:20 +03:00
parent ef1c12b2d1
commit 394758bd73
3 changed files with 8 additions and 8 deletions

View File

@ -156,7 +156,7 @@ namespace CairoChart {
/**
* ``Axis`` line style.
*/
public LineStyle grid_style = LineStyle (Color(), 1, {2, 3});
public LineStyle grid_style = LineStyle(Color(0, 0, 0, 0.25)); // Color(), 1, {2, 3});
/**
* Number of equally placed points to evaluate records sizes.
@ -516,8 +516,9 @@ namespace CairoChart {
for (Float128 v = min; Math.point_belong (v, min, range.zmax); v += step) {
if (is_x && chart.joint_x || !is_x && chart.joint_y) {
chart.color = chart.joint_color;
ser.axis_x.grid_style.color = Color(0, 0, 0, 0.5);
ser.axis_y.grid_style.color = Color(0, 0, 0, 0.5);
grid_style.color.red = chart.joint_color.red;
grid_style.color.green = chart.joint_color.green;
grid_style.color.blue = chart.joint_color.blue;
} else
chart.color = color;
string text = "", time_text = ""; var time_text_t = new Text(chart); var crpt = 0.0;

View File

@ -400,8 +400,8 @@ namespace CairoChart {
}
protected virtual void draw_plarea_border () {
LineStyle().apply(this);
color = border_color;
ctx.set_dash(null, 0);
ctx.rectangle(plarea.x0, plarea.y0, plarea.width, plarea.height);
ctx.stroke ();
}

View File

@ -73,10 +73,9 @@ namespace CairoChart {
line_style.color = value;
axis_x.color = value;
axis_y.color = value;
axis_x.grid_style.color = value;
axis_x.grid_style.color.alpha = 0.5;
axis_y.grid_style.color = value;
axis_y.grid_style.color.alpha = 0.5;
axis_x.grid_style.color.red = axis_y.grid_style.color.red = value.red;
axis_x.grid_style.color.green = axis_y.grid_style.color.green = value.green;
axis_x.grid_style.color.blue = axis_y.grid_style.color.blue = value.blue;
}
default = Color (0, 0, 0, 1);
}