OK In progress...
This commit is contained in:
parent
e402ee7ec4
commit
b382247757
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue