In progress...

This commit is contained in:
Kolan Sh 2018-01-15 18:11:38 +03:00
parent 4ff32b797e
commit 42feb73732
1 changed files with 13 additions and 8 deletions

View File

@ -57,10 +57,10 @@ namespace CairoChart {
calc_plot_area (); calc_plot_area ();
draw_horizontal_axis (); draw_horizontal_axes ();
check_cur_values (); check_cur_values ();
draw_vertical_axis (); draw_vertical_axes ();
check_cur_values (); check_cur_values ();
draw_plot_area_border (); draw_plot_area_border ();
@ -318,11 +318,10 @@ namespace CairoChart {
public CairoChart.Math math = new Math(); public CairoChart.Math math = new Math();
protected virtual void draw_horizontal_axis () { protected virtual void draw_horizontal_axis (int si, ref int nskip) {
for (var si = series.length - 1, nskip = 0; si >=0; --si) {
var s = series[si]; var s = series[si];
if (!s.zoom_show) continue; if (!s.zoom_show) return;
if (joint_x && si != zoom_first_show) continue; if (joint_x && si != zoom_first_show) return;
// 1. Detect max record width/height by axis.nrecords equally selected points using format. // 1. Detect max record width/height by axis.nrecords equally selected points using format.
double max_rec_width, max_rec_height; double max_rec_width, max_rec_height;
@ -450,7 +449,7 @@ namespace CairoChart {
double tmp1 = 0, tmp2 = 0, tmp3 = 0, tmp4 = 0; double tmp1 = 0, tmp2 = 0, tmp3 = 0, tmp4 = 0;
s.join_relative_x_axes (this, si, false, ref tmp1, ref tmp2, ref tmp3, ref tmp4, ref nskip); s.join_relative_x_axes (this, si, false, ref tmp1, ref tmp2, ref tmp3, ref tmp4, ref nskip);
if (nskip != 0) {--nskip; continue;} if (nskip != 0) {--nskip; return;}
switch (s.axis_x.position) { switch (s.axis_x.position) {
case Axis.Position.LOW: case Axis.Position.LOW:
@ -462,10 +461,16 @@ namespace CairoChart {
+ (s.axis_x.title.text == "" ? 0 : sz.height + s.axis_x.font_indent); + (s.axis_x.title.text == "" ? 0 : sz.height + s.axis_x.font_indent);
break; break;
} }
}
protected virtual void draw_horizontal_axes () {
for (var si = series.length - 1, nskip = 0; si >=0; --si) {
draw_horizontal_axis (si, ref nskip);
} }
} }
protected virtual void draw_vertical_axis () { protected virtual void draw_vertical_axes () {
for (var si = series.length - 1, nskip = 0; si >=0; --si) { for (var si = series.length - 1, nskip = 0; si >=0; --si) {
var s = series[si]; var s = series[si];
if (!s.zoom_show) continue; if (!s.zoom_show) continue;