Skip to content

Commit

Permalink
Fix graph
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Dec 14, 2020
1 parent d988604 commit 9595504
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/boxes/box_scheduled_jobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ public function loadBox($max = 5)
'text' => $langs->trans("NumberScheduledJobError")
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"colspan="2"',
'textnoformat' => $nbjobsinerror ? '<span class="error"><a href="'.DOL_URL_ROOT.'/cron/list.php?search_lastresult='.urlencode('<>0').'">'.$nbjobsinerror.'</a></span>'.img_error() : '0'
'td' => 'class="right" colspan="2"',
'textnoformat' => ($nbjobsinerror ? '<span class="error"><a href="'.DOL_URL_ROOT.'/cron/list.php?search_lastresult='.urlencode('<>0').'">'.$nbjobsinerror.'</a></span>'.img_error() : '0')
);
} else {
$this->info_box_contents[0][0] = array(
Expand Down
5 changes: 3 additions & 2 deletions htdocs/core/class/dolgraph.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1151,10 +1151,11 @@ private function draw_chart($file, $fileurl)
$this->stringtoshow .= ', stacked: true';
}
$this->stringtoshow .= ' }]';
$this->stringtoshow .= ', yAxes: [{ ticks: { beginAtZero: true }';
if ($type == 'bar' && count($arrayofgroupslegend) > 0) {
$this->stringtoshow .= ', yAxes: [{ stacked: true }]';
$this->stringtoshow .= ', stacked: true';
}
$this->stringtoshow .= ' }';
$this->stringtoshow .= ' }] }';
// Add a callback to change label to show only positive value
if ($isfunnel) {
$this->stringtoshow .= ', tooltips: { mode: \'nearest\',
Expand Down

0 comments on commit 9595504

Please sign in to comment.