Commit abfcb76c81914fc987f787b9a2f236fa466150cc
1 parent
0ee64783
Exists in
master
and in
65 other branches
Add layout property to draw time axes only for the lower time plot (#5493)
Showing
2 changed files
with
15 additions
and
1 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
... | ... | @@ -313,6 +313,7 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
313 | 313 | $pageNode->getLayout()->setPanelHeight($tab->{'page-layout-object'}->{'layout-panel-height'}); |
314 | 314 | $pageNode->getLayout()->setPanelSpacing($tab->{'page-layout-object'}->{'layout-panel-spacing'}); |
315 | 315 | $pageNode->getLayout()->setExpand($tab->{'page-layout-object'}->{'layout-expand'} ? "true" : "false"); |
316 | + $pageNode->getLayout()->setOnlyLowerTimeAxesLegend($tab->{'page-layout-object'}->{'layout-timeaxes-legend-lowerone'} ? "true" : "false"); | |
316 | 317 | //if ($tab->{'page-layout-object'}->{'layout-timeplot-width'} > 0) |
317 | 318 | // $pageNode->setDefaultTimePlotWidth($tab->{'page-layout-object'}->{'layout-timeplot-width'}); |
318 | 319 | if ($tab->{'page-layout-object'}->{'layout-timeplot-height'} > 0) |
... | ... | @@ -327,6 +328,7 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
327 | 328 | $pageNode->getLayout()->setPanelHeight($tab->{'page-layout-object'}->{'layout-panel-height'}); |
328 | 329 | $pageNode->getLayout()->setPanelSpacing($tab->{'page-layout-object'}->{'layout-panel-spacing'}); |
329 | 330 | $pageNode->getLayout()->setExpand($tab->{'page-layout-object'}->{'layout-expand'} ? "true" : "false"); |
331 | + $pageNode->getLayout()->setOnlyLowerTimeAxesLegend($tab->{'page-layout-object'}->{'layout-timeaxes-legend-lowerone'} ? "true" : "false"); | |
330 | 332 | break; |
331 | 333 | case 'manual' : |
332 | 334 | $pageNode->getLayout()->setType(RequestOutputPlotLayoutTypeEnum::MANUAL); |
... | ... |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotLayoutNodeClass.php
... | ... | @@ -6,6 +6,7 @@ define ("REQUESTOUTPUTPLOTLAYOUT_PANELHEIGHT", "panelHeight"); |
6 | 6 | define ("REQUESTOUTPUTPLOTLAYOUT_PANELSPACING", "panelSpacing"); |
7 | 7 | define ("REQUESTOUTPUTPLOTLAYOUT_FIRSTPANELHEIGHTFACTOR", "firstPanelHeightFactor"); |
8 | 8 | define ("REQUESTOUTPUTPLOTLAYOUT_EXPAND", "expand"); |
9 | +define ("REQUESTOUTPUTPLOTLAYOUT_ONLYLOWERTIMEAXESLEGEND", "onlyLowerTimeAxesLegend"); | |
9 | 10 | |
10 | 11 | abstract class RequestOutputPlotLayoutTypeEnum |
11 | 12 | { |
... | ... | @@ -75,7 +76,17 @@ class RequestOutputPlotLayoutNodeClass extends NodeClass |
75 | 76 | { |
76 | 77 | return $this->getAttribute(REQUESTOUTPUTPLOTLAYOUT_EXPAND); |
77 | 78 | } |
79 | + | |
80 | + public function setOnlyLowerTimeAxesLegend($onlyLower) | |
81 | + { | |
82 | + $this->setAttribute(REQUESTOUTPUTPLOTLAYOUT_ONLYLOWERTIMEAXESLEGEND, $onlyLower); | |
83 | + } | |
78 | 84 | |
85 | + public function getOnlyLowerTimeAxesLegend() | |
86 | + { | |
87 | + return $this->getAttribute(REQUESTOUTPUTPLOTLAYOUT_ONLYLOWERTIMEAXESLEGEND); | |
88 | + } | |
89 | + | |
79 | 90 | public function loadFromNode($xmlNode) |
80 | 91 | { |
81 | 92 | $this->setType($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_TYPE)); |
... | ... | @@ -83,8 +94,9 @@ class RequestOutputPlotLayoutNodeClass extends NodeClass |
83 | 94 | $this->setPanelSpacing($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_PANELSPACING)); |
84 | 95 | $this->setFirstPanelHeightFactor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_FIRSTPANELHEIGHTFACTOR)); |
85 | 96 | $this->setExpand($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_EXPAND)); |
97 | + $this->setOnlyLowerTimeAxesLegend($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTLAYOUT_ONLYLOWERTIMEAXESLEGEND)); | |
86 | 98 | } |
87 | 99 | } |
88 | 100 | ?> |
89 | 101 | |
90 | - | |
91 | 102 | \ No newline at end of file |
103 | + | |
... | ... |