Fix setShowLegend with chartjs

This commit is contained in:
Laurent Destailleur 2020-03-06 09:51:30 +01:00
parent 201f9badeb
commit ea658ebe72

View File

@ -1146,6 +1146,9 @@ class DolGraph
$this->stringtoshow .= 'var options = { maintainAspectRatio: false, aspectRatio: 2.5, ';
if (empty($showlegend)) {
$this->stringtoshow .= 'legend: { display: false }, ';
}
$this->stringtoshow .= 'scales: { xAxes: [{ ';
//$this->stringtoshow .= 'type: \'time\', '; // Need Moment.js
$this->stringtoshow .= 'distribution: \'linear\'';