$Plot->setXAxisAsTime(); if (!$All && !$lastHalf && !$lastYear) { $Plot->setXAxisLimitedTo($Year); } $Plot->addYAxis(1, 'left'); $Plot->setYTicks(1, 1); if (Configuration::Trimp()->showInPercent()) { $Plot->addYUnit(1, '%'); $Plot->setYLimits(1, 0, 100); } $Plot->addYAxis(2, 'right'); $Plot->setYTicks(2, 1, 1); $Plot->addYAxis(3, 'right'); $Plot->setYLimits(3, 0, $maxTrimp * 2); $Plot->showAsBars(3, 1, 2); $Plot->showAsPoints(4); $Plot->smoothing(false); if (($lastHalf || $lastYear) && !$DataFailed) { $Plot->addMarkingArea('x', Plot::dayOfYearToJStime($StartYear, $HighestIndex - 30 - $AddDays + $StartDayInYear + 1), $index, 'rgba(255,255,255,0.3)'); //'rgba(200,200,200,0.5)'); } $Plot->setGridAboveData(); if ($All) { $Plot->setTitle(__('Shape for all years')); } else { $Plot->setTitle(__('Shape') . ' ' . $Year); } if ($DataFailed) { $Plot->raiseError(__('No data available.')); } $Plot->outputJavaScript();