OK In progress...
This commit is contained in:
parent
9a03af4b85
commit
4e6045d160
|
@ -10,23 +10,17 @@ namespace CairoChart {
|
||||||
LINE
|
LINE
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
/**
|
|
||||||
* Color of the ``Grid``.
|
|
||||||
*/
|
|
||||||
public Color color = Color (0, 0, 0, 0.1);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Line style of the ``Grid``.
|
* Line style of the ``Grid``.
|
||||||
*/
|
*/
|
||||||
public LineStyle line_style = LineStyle ();
|
public LineStyle style = LineStyle ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a copy of the ``Grid``.
|
* Gets a copy of the ``Grid``.
|
||||||
*/
|
*/
|
||||||
public virtual Grid copy () {
|
public virtual Grid copy () {
|
||||||
var grid = new Grid ();
|
var grid = new Grid ();
|
||||||
grid.color = this.color;
|
grid.style = this.style;
|
||||||
grid.line_style = this.line_style;
|
|
||||||
return grid;
|
return grid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +28,7 @@ namespace CairoChart {
|
||||||
* Constructs a new ``Grid``.
|
* Constructs a new ``Grid``.
|
||||||
*/
|
*/
|
||||||
public Grid () {
|
public Grid () {
|
||||||
line_style.dashes = {2, 3};
|
style.dashes = {2, 3};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace CairoChart {
|
||||||
*/
|
*/
|
||||||
public class Marker {
|
public class Marker {
|
||||||
|
|
||||||
Chart chart = null;
|
Chart chart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ``Marker`` shape.
|
* ``Marker`` shape.
|
||||||
|
@ -28,7 +28,7 @@ namespace CairoChart {
|
||||||
/**
|
/**
|
||||||
* ``Marker`` size.
|
* ``Marker`` size.
|
||||||
*/
|
*/
|
||||||
public double size = 8.0;
|
public double size;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new ``Marker``.
|
* Constructs a new ``Marker``.
|
||||||
|
|
|
@ -31,10 +31,8 @@ namespace CairoChart {
|
||||||
line_style.color = _color;
|
line_style.color = _color;
|
||||||
axis_x.color = _color;
|
axis_x.color = _color;
|
||||||
axis_y.color = _color;
|
axis_y.color = _color;
|
||||||
grid.color = _color;
|
grid.style.color = _color;
|
||||||
grid.color.alpha = 0.5;
|
grid.style.color.alpha = 0.5;
|
||||||
grid.line_style.color = _color;
|
|
||||||
grid.line_style.color.alpha = 0.5;
|
|
||||||
}
|
}
|
||||||
default = Color (0.0, 0.0, 0.0, 1.0);
|
default = Color (0.0, 0.0, 0.0, 1.0);
|
||||||
}
|
}
|
||||||
|
@ -282,9 +280,9 @@ namespace CairoChart {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// 6. Draw grid lines to the place.zy0.
|
// 6. Draw grid lines to the place.zy0.
|
||||||
var line_style = grid.line_style;
|
var grid_style = grid.style;
|
||||||
if (joint_x) line_style.color = Color(0, 0, 0, 0.5);
|
if (joint_x) grid_style.color = Color(0, 0, 0, 0.5);
|
||||||
line_style.apply(chart);
|
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);
|
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);
|
ctx.move_to (scr_x, y);
|
||||||
if (joint_x)
|
if (joint_x)
|
||||||
|
@ -310,9 +308,9 @@ namespace CairoChart {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// 6. Draw grid lines to the place.zy1.
|
// 6. Draw grid lines to the place.zy1.
|
||||||
var line_style = grid.line_style;
|
var grid_style = grid.style;
|
||||||
if (joint_x) line_style.color = Color(0, 0, 0, 0.5);
|
if (joint_x) grid_style.color = Color(0, 0, 0, 0.5);
|
||||||
line_style.apply(chart);
|
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);
|
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);
|
ctx.move_to (scr_x, y);
|
||||||
if (joint_x)
|
if (joint_x)
|
||||||
|
@ -411,9 +409,9 @@ namespace CairoChart {
|
||||||
compact_rec_y_pos (y, text_t));
|
compact_rec_y_pos (y, text_t));
|
||||||
text_t.show();
|
text_t.show();
|
||||||
// 6. Draw grid lines to the place.zx0.
|
// 6. Draw grid lines to the place.zx0.
|
||||||
var line_style = grid.line_style;
|
var grid_style = grid.style;
|
||||||
if (joint_y) line_style.color = Color(0, 0, 0, 0.5);
|
if (joint_y) grid_style.color = Color(0, 0, 0, 0.5);
|
||||||
line_style.apply(chart);
|
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);
|
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);
|
ctx.move_to (x, scr_y);
|
||||||
if (joint_y)
|
if (joint_y)
|
||||||
|
@ -427,9 +425,9 @@ namespace CairoChart {
|
||||||
compact_rec_y_pos (y, text_t));
|
compact_rec_y_pos (y, text_t));
|
||||||
text_t.show();
|
text_t.show();
|
||||||
// 6. Draw grid lines to the place.zx1.
|
// 6. Draw grid lines to the place.zx1.
|
||||||
var line_style = grid.line_style;
|
var grid_style = grid.style;
|
||||||
if (joint_y) line_style.color = Color(0, 0, 0, 0.5);
|
if (joint_y) grid_style.color = Color(0, 0, 0, 0.5);
|
||||||
line_style.apply(chart);
|
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);
|
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);
|
ctx.move_to (x, scr_y);
|
||||||
if (joint_y)
|
if (joint_y)
|
||||||
|
|
Loading…
Reference in New Issue