From b4bc90c45d87b045e556c838d51fe390d201489c Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Thu, 18 Jan 2018 16:57:39 +0300 Subject: [PATCH] In progress... --- src/Chart.vala | 6 +++--- src/Cursor.vala | 8 ++++---- src/Series.vala | 8 ++++---- test/ChartTest.vala | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Chart.vala b/src/Chart.vala index 2d5def9..d577ec6 100644 --- a/src/Chart.vala +++ b/src/Chart.vala @@ -17,13 +17,13 @@ namespace CairoChart { { x = 0, y = 0, width = 1, height = 1 }; /** - * Zoom Limits (relative coordinates: 0.0-1.0). + * Zoom area limits (relative coordinates: 0.0-1.0). */ public Cairo.Rectangle zoom = Cairo.Rectangle() { x = 0, y = 0, width = 1, height = 1 }; /** - * Plot Area Bounds. + * Plot area bounds. */ public Cairo.Rectangle plarea = Cairo.Rectangle() { x = 0, y = 0, width = 1, height = 1 }; @@ -76,7 +76,7 @@ namespace CairoChart { /** * Joint/common axis color. */ - public Color joint_axis_color = Color (0, 0, 0, 1); + public Color joint_color = Color (0, 0, 0, 1); /** * Selection line style. diff --git a/src/Cursor.vala b/src/Cursor.vala index 076d10b..d9978a1 100644 --- a/src/Cursor.vala +++ b/src/Cursor.vala @@ -386,7 +386,7 @@ namespace CairoChart { chart.color = s.axis_x.color; var text_t = new Text(s.axis_x.format.printf((LongDouble)point.x), s.axis_x.font_style); chart.ctx.move_to (svp.x - size.x / 2, svp.y + text_t.get_height(chart.ctx) / 2); - if (chart.joint_x) chart.color = chart.joint_axis_color; + if (chart.joint_x) chart.color = chart.joint_color; text_t.show(chart.ctx); } @@ -399,7 +399,7 @@ namespace CairoChart { var y = svp.y + sz.height / 2; if (show_date) y -= sz.height / 2 + s.axis_x.font_indent / 2; chart.ctx.move_to (svp.x - size.x / 2, y); - if (chart.joint_x) chart.color = chart.joint_axis_color; + if (chart.joint_x) chart.color = chart.joint_color; text_t.show(chart.ctx); } @@ -412,7 +412,7 @@ namespace CairoChart { var y = svp.y + sz.height / 2; if (show_time) y += sz.height / 2 + s.axis_x.font_indent / 2; chart.ctx.move_to (svp.x - size.x / 2, y); - if (chart.joint_x) chart.color = chart.joint_axis_color; + if (chart.joint_x) chart.color = chart.joint_color; text_t.show(chart.ctx); } @@ -421,7 +421,7 @@ namespace CairoChart { var text_t = new Text(s.axis_y.format.printf((LongDouble)point.y), s.axis_y.font_style); var sz = text_t.get_size(chart.ctx); chart.ctx.move_to (svp.x + size.x / 2 - sz.width, svp.y + sz.height / 2); - if (chart.joint_y) chart.color = chart.joint_axis_color; + if (chart.joint_y) chart.color = chart.joint_color; text_t.show(chart.ctx); } } diff --git a/src/Series.vala b/src/Series.vala index 3f8ea11..a57a2a9 100644 --- a/src/Series.vala +++ b/src/Series.vala @@ -253,7 +253,7 @@ namespace CairoChart { var joint_x = chart.joint_x; for (Float128 x = x_min, x_max = axis_x.zoom_max; chart.math.point_belong (x, x_min, x_max); x += step) { - if (joint_x) chart.color = chart.joint_axis_color; + if (joint_x) chart.color = chart.joint_color; else chart.color = axis_x.color; string text = "", time_text = ""; switch (axis_x.type) { @@ -377,7 +377,7 @@ namespace CairoChart { } chart.ctx.move_to(scr_x - sz.width / 2.0, scr_y); chart.color = s.axis_x.color; - if (chart.joint_x) chart.color = chart.joint_axis_color; + if (chart.joint_x) chart.color = chart.joint_color; s.axis_x.title.show(chart.ctx); } @@ -408,7 +408,7 @@ namespace CairoChart { var joint_y = chart.joint_y; for (Float128 y = y_min, y_max = axis_y.zoom_max; chart.math.point_belong (y, y_min, y_max); y += step) { - if (joint_y) chart.color = chart.joint_axis_color; + if (joint_y) chart.color = chart.joint_color; else chart.color = axis_y.color; var text = axis_y.format.printf((LongDouble)y); var scr_y = get_scr_y (y); @@ -505,7 +505,7 @@ namespace CairoChart { break; } chart.color = s.axis_y.color; - if (chart.joint_y) chart.color = chart.joint_axis_color; + if (chart.joint_y) chart.color = chart.joint_color; s.axis_y.title.show(chart.ctx); } diff --git a/test/ChartTest.vala b/test/ChartTest.vala index 70a4c37..48640ac 100644 --- a/test/ChartTest.vala +++ b/test/ChartTest.vala @@ -441,7 +441,7 @@ int main (string[] args) { ctx.rectangle (x0, y0 - h, w, h); ctx.fill(); ctx.move_to (x0, y0); - chart.color = chart.joint_axis_color; + chart.color = chart.joint_color; ctx.show_text(text); }