OK In progress...

This commit is contained in:
Kolan Sh 2018-01-22 09:04:26 +03:00
parent 9a03af4b85
commit 4e6045d160
3 changed files with 19 additions and 27 deletions

View File

@ -10,23 +10,17 @@ namespace CairoChart {
LINE
}*/
/**
* Color of the ``Grid``.
*/
public Color color = Color (0, 0, 0, 0.1);
/**
* Line style of the ``Grid``.
*/
public LineStyle line_style = LineStyle ();
public LineStyle style = LineStyle ();
/**
* Gets a copy of the ``Grid``.
*/
public virtual Grid copy () {
var grid = new Grid ();
grid.color = this.color;
grid.line_style = this.line_style;
grid.style = this.style;
return grid;
}
@ -34,7 +28,7 @@ namespace CairoChart {
* Constructs a new ``Grid``.
*/
public Grid () {
line_style.dashes = {2, 3};
style.dashes = {2, 3};
}
}
}

View File

@ -5,7 +5,7 @@ namespace CairoChart {
*/
public class Marker {
Chart chart = null;
Chart chart;
/**
* ``Marker`` shape.
@ -28,7 +28,7 @@ namespace CairoChart {
/**
* ``Marker`` size.
*/
public double size = 8.0;
public double size;
/**
* Constructs a new ``Marker``.

View File

@ -31,10 +31,8 @@ namespace CairoChart {
line_style.color = _color;
axis_x.color = _color;
axis_y.color = _color;
grid.color = _color;
grid.color.alpha = 0.5;
grid.line_style.color = _color;
grid.line_style.color.alpha = 0.5;
grid.style.color = _color;
grid.style.color.alpha = 0.5;
}
default = Color (0.0, 0.0, 0.0, 1.0);
}
@ -282,9 +280,9 @@ namespace CairoChart {
break;
}
// 6. Draw grid lines to the place.zy0.
var line_style = grid.line_style;
if (joint_x) line_style.color = Color(0, 0, 0, 0.5);
line_style.apply(chart);
var grid_style = grid.style;
if (joint_x) grid_style.color = Color(0, 0, 0, 0.5);
grid_style.apply(chart);
double y = chart.evarea.y1 - max_rec_height - axis_x.font_spacing - (axis_x.title.text == "" ? 0 : axis_x.title.height + axis_x.font_spacing);
ctx.move_to (scr_x, y);
if (joint_x)
@ -310,9 +308,9 @@ namespace CairoChart {
break;
}
// 6. Draw grid lines to the place.zy1.
var line_style = grid.line_style;
if (joint_x) line_style.color = Color(0, 0, 0, 0.5);
line_style.apply(chart);
var grid_style = grid.style;
if (joint_x) grid_style.color = Color(0, 0, 0, 0.5);
grid_style.apply(chart);
double y = chart.evarea.y0 + max_rec_height + axis_x.font_spacing + (axis_x.title.text == "" ? 0 : axis_x.title.height + axis_x.font_spacing);
ctx.move_to (scr_x, y);
if (joint_x)
@ -411,9 +409,9 @@ namespace CairoChart {
compact_rec_y_pos (y, text_t));
text_t.show();
// 6. Draw grid lines to the place.zx0.
var line_style = grid.line_style;
if (joint_y) line_style.color = Color(0, 0, 0, 0.5);
line_style.apply(chart);
var grid_style = grid.style;
if (joint_y) grid_style.color = Color(0, 0, 0, 0.5);
grid_style.apply(chart);
double x = chart.evarea.x0 + max_rec_width + axis_y.font_spacing + (axis_y.title.text == "" ? 0 : axis_y.title.width + axis_y.font_spacing);
ctx.move_to (x, scr_y);
if (joint_y)
@ -427,9 +425,9 @@ namespace CairoChart {
compact_rec_y_pos (y, text_t));
text_t.show();
// 6. Draw grid lines to the place.zx1.
var line_style = grid.line_style;
if (joint_y) line_style.color = Color(0, 0, 0, 0.5);
line_style.apply(chart);
var grid_style = grid.style;
if (joint_y) grid_style.color = Color(0, 0, 0, 0.5);
grid_style.apply(chart);
double x = chart.evarea.x1 - max_rec_width - axis_y.font_spacing - (axis_y.title.text == "" ? 0 : axis_y.title.width + axis_y.font_spacing);
ctx.move_to (x, scr_y);
if (joint_y)