In progress...
This commit is contained in:
parent
597007a6f9
commit
fb7971fed6
|
@ -296,9 +296,9 @@ namespace CairoChart {
|
||||||
var max_axis_font_height = axis.title.text == "" ? 0 : axis.title.get_height(context) + axis.font_indent;
|
var max_axis_font_height = axis.title.text == "" ? 0 : axis.title.get_height(context) + axis.font_indent;
|
||||||
|
|
||||||
if (is_x)
|
if (is_x)
|
||||||
s.join_relative_x_axes (this, si, true, ref max_rec_width, ref max_rec_height, ref max_font_indent, ref max_axis_font_height, ref nskip);
|
s.join_relative_x_axes (si, true, ref max_rec_width, ref max_rec_height, ref max_font_indent, ref max_axis_font_height, ref nskip);
|
||||||
else
|
else
|
||||||
s.join_relative_y_axes (this, si, true, ref max_rec_width, ref max_rec_height, ref max_font_indent, ref max_axis_font_width, ref nskip);
|
s.join_relative_y_axes (si, true, ref max_rec_width, ref max_rec_height, ref max_font_indent, ref max_axis_font_width, ref nskip);
|
||||||
|
|
||||||
// for 4.2. Cursor values for joint X axis
|
// for 4.2. Cursor values for joint X axis
|
||||||
if (si == zoom_first_show && cursors_crossings.length != 0) {
|
if (si == zoom_first_show && cursors_crossings.length != 0) {
|
||||||
|
@ -356,12 +356,12 @@ namespace CairoChart {
|
||||||
|
|
||||||
protected virtual void draw_horizontal_axes () {
|
protected virtual void draw_horizontal_axes () {
|
||||||
for (var si = series.length - 1, nskip = 0; si >=0; --si)
|
for (var si = series.length - 1, nskip = 0; si >=0; --si)
|
||||||
series[si].draw_horizontal_axis (this, si, ref nskip);
|
series[si].draw_horizontal_axis (si, ref nskip);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void draw_vertical_axes () {
|
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)
|
||||||
series[si].draw_vertical_axis (this, si, ref nskip);
|
series[si].draw_vertical_axis (si, ref nskip);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void draw_plot_area_border () {
|
protected virtual void draw_plot_area_border () {
|
||||||
|
@ -425,7 +425,7 @@ namespace CairoChart {
|
||||||
for (var si = 0; si < series.length; ++si) {
|
for (var si = 0; si < series.length; ++si) {
|
||||||
var s = series[si];
|
var s = series[si];
|
||||||
if (s.zoom_show && s.points.length != 0)
|
if (s.zoom_show && s.points.length != 0)
|
||||||
s.draw(this);
|
s.draw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ namespace CairoChart {
|
||||||
return series;
|
return series;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void draw (Chart chart) {
|
public virtual void draw () {
|
||||||
var points = chart.math.sort_points(this, sort);
|
var points = chart.math.sort_points(this, sort);
|
||||||
line_style.set(chart);
|
line_style.set(chart);
|
||||||
// draw series line
|
// draw series line
|
||||||
|
@ -113,8 +113,7 @@ namespace CairoChart {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void join_relative_x_axes (Chart chart,
|
public virtual void join_relative_x_axes (int si,
|
||||||
int si,
|
|
||||||
bool calc_max_values,
|
bool calc_max_values,
|
||||||
ref double max_rec_width,
|
ref double max_rec_width,
|
||||||
ref double max_rec_height,
|
ref double max_rec_height,
|
||||||
|
@ -152,8 +151,7 @@ namespace CairoChart {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void join_relative_y_axes (Chart chart,
|
public virtual void join_relative_y_axes (int si,
|
||||||
int si,
|
|
||||||
bool calc_max_values,
|
bool calc_max_values,
|
||||||
ref double max_rec_width,
|
ref double max_rec_width,
|
||||||
ref double max_rec_height,
|
ref double max_rec_height,
|
||||||
|
@ -189,7 +187,7 @@ namespace CairoChart {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void draw_horizontal_records (Chart chart, Float128 step, double max_rec_height, Float128 x_min) {
|
protected virtual void draw_horizontal_records (Float128 step, double max_rec_height, Float128 x_min) {
|
||||||
// 5. Draw records, update cur_{x,y}_{min,max}.
|
// 5. Draw records, update cur_{x,y}_{min,max}.
|
||||||
var context = chart.context;
|
var context = chart.context;
|
||||||
var joint_x = chart.joint_x;
|
var joint_x = chart.joint_x;
|
||||||
|
@ -270,7 +268,7 @@ namespace CairoChart {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void draw_horizontal_axis (Chart chart, int si, ref int nskip) {
|
public virtual void draw_horizontal_axis (int si, ref int nskip) {
|
||||||
var s = chart.series[si];
|
var s = chart.series[si];
|
||||||
if (!s.zoom_show) return;
|
if (!s.zoom_show) return;
|
||||||
if (chart.joint_x && si != chart.zoom_first_show) return;
|
if (chart.joint_x && si != chart.zoom_first_show) return;
|
||||||
|
@ -323,12 +321,12 @@ namespace CairoChart {
|
||||||
s.axis_x.title.show(chart.context);
|
s.axis_x.title.show(chart.context);
|
||||||
}
|
}
|
||||||
|
|
||||||
s.draw_horizontal_records (chart, step, max_rec_height, x_min);
|
s.draw_horizontal_records (step, max_rec_height, x_min);
|
||||||
|
|
||||||
chart.context.stroke ();
|
chart.context.stroke ();
|
||||||
|
|
||||||
double tmp1 = 0, tmp2 = 0, tmp3 = 0, tmp4 = 0;
|
double tmp1 = 0, tmp2 = 0, tmp3 = 0, tmp4 = 0;
|
||||||
s.join_relative_x_axes (chart, si, false, ref tmp1, ref tmp2, ref tmp3, ref tmp4, ref nskip);
|
s.join_relative_x_axes (si, false, ref tmp1, ref tmp2, ref tmp3, ref tmp4, ref nskip);
|
||||||
|
|
||||||
if (nskip != 0) {--nskip; return;}
|
if (nskip != 0) {--nskip; return;}
|
||||||
|
|
||||||
|
@ -344,7 +342,7 @@ namespace CairoChart {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void draw_vertical_records (Chart chart, Float128 step, double max_rec_width, Float128 y_min) {
|
protected virtual void draw_vertical_records (Float128 step, double max_rec_width, Float128 y_min) {
|
||||||
// 5. Draw records, update cur_{x,y}_{min,max}.
|
// 5. Draw records, update cur_{x,y}_{min,max}.
|
||||||
var context = chart.context;
|
var context = chart.context;
|
||||||
var joint_y = chart.joint_y;
|
var joint_y = chart.joint_y;
|
||||||
|
@ -395,7 +393,7 @@ namespace CairoChart {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void draw_vertical_axis (Chart chart, int si, ref int nskip) {
|
public virtual void draw_vertical_axis (int si, ref int nskip) {
|
||||||
var s = chart.series[si];
|
var s = chart.series[si];
|
||||||
if (!s.zoom_show) return;
|
if (!s.zoom_show) return;
|
||||||
if (chart.joint_y && si != chart.zoom_first_show) return;
|
if (chart.joint_y && si != chart.zoom_first_show) return;
|
||||||
|
@ -451,12 +449,12 @@ namespace CairoChart {
|
||||||
s.axis_y.title.show(chart.context);
|
s.axis_y.title.show(chart.context);
|
||||||
}
|
}
|
||||||
|
|
||||||
s.draw_vertical_records (chart, step, max_rec_width, y_min);
|
s.draw_vertical_records (step, max_rec_width, y_min);
|
||||||
|
|
||||||
chart.context.stroke ();
|
chart.context.stroke ();
|
||||||
|
|
||||||
double tmp1 = 0, tmp2 = 0, tmp3 = 0, tmp4 = 0;
|
double tmp1 = 0, tmp2 = 0, tmp3 = 0, tmp4 = 0;
|
||||||
s.join_relative_y_axes (chart, si, false, ref tmp1, ref tmp2, ref tmp3, ref tmp4, ref nskip);
|
s.join_relative_y_axes (si, false, ref tmp1, ref tmp2, ref tmp3, ref tmp4, ref nskip);
|
||||||
|
|
||||||
if (nskip != 0) {--nskip; return;}
|
if (nskip != 0) {--nskip; return;}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue