From b38224775715701921e8258c90629c5b2b69fcc4 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Mon, 22 Jan 2018 09:19:04 +0300 Subject: [PATCH] OK In progress... --- src/Axis.vala | 2 +- src/Series.vala | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Axis.vala b/src/Axis.vala index 4bfad03..bf65e18 100644 --- a/src/Axis.vala +++ b/src/Axis.vala @@ -101,7 +101,7 @@ namespace CairoChart { time = dt.format(time_format) + dsec_str; } - public virtual void calc_rec_sizes (Chart chart, out double max_rec_width, out double max_rec_height, bool horizontal = true) { + public virtual void calc_rec_sizes (out double max_rec_width, out double max_rec_height, bool horizontal = true) { max_rec_width = max_rec_height = 0; for (var i = 0; i < nrecords; ++i) { Float128 x = (int64)(range.zmin + range.zrange / nrecords * i) + 1.0/3.0; diff --git a/src/Series.vala b/src/Series.vala index 150e7a1..b627ed2 100644 --- a/src/Series.vala +++ b/src/Series.vala @@ -123,7 +123,7 @@ namespace CairoChart { if (!s.zoom_show) return; if (nskip != 0) {--nskip; return;} double max_rec_width = 0; double max_rec_height = 0; - axis.calc_rec_sizes (chart, out max_rec_width, out max_rec_height, is_x); + axis.calc_rec_sizes (out max_rec_width, out max_rec_height, is_x); var max_font_spacing = axis.font_spacing; var max_axis_font_width = axis.title.text == "" ? 0 : axis.title.width + axis.font_spacing; var max_axis_font_height = axis.title.text == "" ? 0 : axis.title.height + axis.font_spacing; @@ -196,7 +196,7 @@ namespace CairoChart { if (!has_intersection) { if (calc_max_values) { double tmp_max_rec_width = 0; double tmp_max_rec_height = 0; - s2.axis_x.calc_rec_sizes (chart, out tmp_max_rec_width, out tmp_max_rec_height, true); + s2.axis_x.calc_rec_sizes (out tmp_max_rec_width, out tmp_max_rec_height, true); max_rec_width = double.max (max_rec_width, tmp_max_rec_width); max_rec_height = double.max (max_rec_height, tmp_max_rec_height); max_font_spacing = double.max (max_font_spacing, s2.axis_x.font_spacing); @@ -233,7 +233,7 @@ namespace CairoChart { } if (!has_intersection) { double tmp_max_rec_width = 0; double tmp_max_rec_height = 0; - s2.axis_y.calc_rec_sizes (chart, out tmp_max_rec_width, out tmp_max_rec_height, false); + s2.axis_y.calc_rec_sizes (out tmp_max_rec_width, out tmp_max_rec_height, false); max_rec_width = double.max (max_rec_width, tmp_max_rec_width); max_rec_height = double.max (max_rec_height, tmp_max_rec_height); max_font_spacing = double.max (max_font_spacing, s2.axis_y.font_spacing); @@ -329,7 +329,7 @@ namespace CairoChart { // 1. Detect max record width/height by axis.nrecords equally selected points using format. double max_rec_width, max_rec_height; - s.axis_x.calc_rec_sizes (chart, out max_rec_width, out max_rec_height, true); + s.axis_x.calc_rec_sizes (out max_rec_width, out max_rec_height, true); // 2. Calculate maximal available number of records, take into account the space width. long max_nrecs = (long) (chart.plarea.width * s.place.zwidth / max_rec_width); @@ -445,7 +445,7 @@ namespace CairoChart { if (chart.joint_y && si != chart.zoom_1st_idx) return; // 1. Detect max record width/height by axis.nrecords equally selected points using format. double max_rec_width, max_rec_height; - s.axis_y.calc_rec_sizes (chart, out max_rec_width, out max_rec_height, false); + s.axis_y.calc_rec_sizes (out max_rec_width, out max_rec_height, false); // 2. Calculate maximal available number of records, take into account the space width. long max_nrecs = (long) (chart.plarea.height * s.place.zheight / max_rec_height);