diff --git a/src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php b/src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php index ce8233d..b724b90 100644 --- a/src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php +++ b/src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php @@ -517,12 +517,30 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass if (isset($axisData->{'axis-grid-major-number'}) && $axisData->{'axis-grid-major-number'} != 0) $axisNode->getTick()->setMajorGridNumber($axisData->{'axis-grid-major-number'}); } elseif ($axisData->{'axis-grid-specify-ticks-spacing'}) { + $timeMultiplier = 1; + if(isset($axisData->{'axis-tick-time-unit'}) && ($axisData->{'axis-type'} == "time" || $axisData->{'axis-type'} == "epoch" )){ + switch ($axisData->{'axis-tick-time-unit'}) { + case 'default': + $timeMultiplier = 1; + break; + case 'min': + $timeMultiplier = 60; + break; + case "hour": + $timeMultiplier = 3600; + break; + case "day": + $timeMultiplier = 86400; + break; + } + } if (isset($axisData->{'axis-grid-major-space'}) && $axisData->{'axis-grid-major-space'} != 0) - $axisNode->getTick()->setMajorGridSpace($axisData->{'axis-grid-major-space'}); + $axisNode->getTick()->setMajorGridSpace($axisData->{'axis-grid-major-space'}*$timeMultiplier); if (isset($axisData->{'axis-grid-minor-space'}) && $axisData->{'axis-grid-minor-space'} != 0) - $axisNode->getTick()->setMinorGridSpace($axisData->{'axis-grid-minor-space'}); + $axisNode->getTick()->setMinorGridSpace($axisData->{'axis-grid-minor-space'}*$timeMultiplier); + } -- libgit2 0.21.2