Cursors: Move common axex.
This commit is contained in:
parent
dc18d83414
commit
4e89e2682e
|
@ -665,6 +665,24 @@ namespace Gtk.CairoChart {
|
|||
}
|
||||
}
|
||||
|
||||
// 4.2. Cursor values for common X axis
|
||||
if (common_x_axes && si == zoom_first_show && cursors_orientation == CursorOrientation.VERTICAL && cursors_crossings.length != 0) {
|
||||
switch (s.axis_x.position) {
|
||||
case Axis.Position.LOW: plot_area_y_max -= max_rec_height + s.axis_x.font_indent; break;
|
||||
case Axis.Position.HIGH: plot_area_y_min += max_rec_height + s.axis_x.font_indent; break;
|
||||
case Axis.Position.BOTH: break;
|
||||
}
|
||||
}
|
||||
|
||||
// 4.2. Cursor values for common Y axis
|
||||
if (common_y_axes && si == zoom_first_show && cursors_orientation == CursorOrientation.HORIZONTAL && cursors_crossings.length != 0) {
|
||||
switch (s.axis_y.position) {
|
||||
case Axis.Position.LOW: plot_area_x_min += max_rec_width + s.axis_y.font_indent; break;
|
||||
case Axis.Position.HIGH: plot_area_x_max -= max_rec_width + s.axis_y.font_indent; break;
|
||||
case Axis.Position.BOTH: break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!common_y_axes || si == zoom_first_show)
|
||||
switch (s.axis_y.position) {
|
||||
case Axis.Position.LOW: plot_area_x_min += max_rec_width + max_font_indent + max_axis_font_width; break;
|
||||
|
@ -710,6 +728,15 @@ namespace Gtk.CairoChart {
|
|||
}
|
||||
if (x_min < s.axis_x.zoom_min) x_min += step;
|
||||
|
||||
// 4.2. Cursor values for common X axis
|
||||
if (common_x_axes && cursors_orientation == CursorOrientation.VERTICAL && cursors_crossings.length != 0) {
|
||||
switch (s.axis_x.position) {
|
||||
case Axis.Position.LOW: cur_y_max -= max_rec_height + s.axis_x.font_indent; break;
|
||||
case Axis.Position.HIGH: cur_y_min += max_rec_height + s.axis_x.font_indent; break;
|
||||
case Axis.Position.BOTH: break;
|
||||
}
|
||||
}
|
||||
|
||||
// 4.5. Draw Axis title
|
||||
if (s.axis_x.title.text != "")
|
||||
switch (s.axis_x.position) {
|
||||
|
@ -901,6 +928,15 @@ namespace Gtk.CairoChart {
|
|||
}
|
||||
if (y_min < s.axis_y.zoom_min) y_min += step;
|
||||
|
||||
// 4.2. Cursor values for common Y axis
|
||||
if (common_y_axes && cursors_orientation == CursorOrientation.HORIZONTAL && cursors_crossings.length != 0) {
|
||||
switch (s.axis_y.position) {
|
||||
case Axis.Position.LOW: cur_x_min += max_rec_width + s.axis_y.font_indent; break;
|
||||
case Axis.Position.HIGH: cur_x_max -= max_rec_width + s.axis_y.font_indent; break;
|
||||
case Axis.Position.BOTH: break;
|
||||
}
|
||||
}
|
||||
|
||||
// 4.5. Draw Axis title
|
||||
if (s.axis_y.title.text != "")
|
||||
switch (s.axis_y.position) {
|
||||
|
|
Loading…
Reference in New Issue