diff --git a/src/Chart.vala b/src/Chart.vala index b82ffa3..6d55e99 100644 --- a/src/Chart.vala +++ b/src/Chart.vala @@ -312,6 +312,10 @@ namespace CairoChart { plarea.width = evarea.width - 2 * legend.spacing; plarea.y0 = evarea.y0 + legend.spacing; plarea.height = evarea.height - 2 * legend.spacing; + /*plarea.x0 = evarea.x0 + (legend.show ? legend.spacing : 0); + plarea.width = evarea.width - 2 * (legend.show ? legend.spacing : 0); + plarea.y0 = evarea.y0 + (legend.show ? legend.spacing : 0); + plarea.height = evarea.height - 2 * (legend.show ? legend.spacing : 0);*/ // Check for joint axes joint_x = joint_y = true; diff --git a/src/Legend.vala b/src/Legend.vala index 3bb6b6d..b0378af 100644 --- a/src/Legend.vala +++ b/src/Legend.vala @@ -42,6 +42,7 @@ namespace CairoChart { } public virtual void draw (Chart chart) { + if (!show) return; process (chart, ProcessType.CALC); process (chart, ProcessType.DRAW); }