Fixes #148: legend.show ignored, fix it

This commit is contained in:
Kolan Sh 2018-01-21 19:59:13 +03:00
parent a3f83df580
commit 26030290d4
2 changed files with 5 additions and 0 deletions

View File

@ -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;

View File

@ -42,6 +42,7 @@ namespace CairoChart {
}
public virtual void draw (Chart chart) {
if (!show) return;
process (chart, ProcessType.CALC);
process (chart, ProcessType.DRAW);
}