Commit d9b59c1c0f76ee37ec581927eb8e894a69a90ecc
Exists in
master
and in
56 other branches
Merge branch 'master' of https://gitlab.irap.omp.eu/CDPP/AMDA_Integration
Showing
2 changed files
with
69 additions
and
4 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
@@ -589,10 +589,27 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | @@ -589,10 +589,27 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | ||
589 | //axis minor and major grid | 589 | //axis minor and major grid |
590 | if (isset($axisData->{'axis-grid-minor'})) | 590 | if (isset($axisData->{'axis-grid-minor'})) |
591 | $axisNode->getTick()->setMinorGrid($axisData->{'axis-grid-minor'} ? "true" : "false"); | 591 | $axisNode->getTick()->setMinorGrid($axisData->{'axis-grid-minor'} ? "true" : "false"); |
592 | + | ||
592 | if (isset($axisData->{'axis-grid-major'})) | 593 | if (isset($axisData->{'axis-grid-major'})) |
593 | $axisNode->getTick()->setMajorGrid($axisData->{'axis-grid-major'} ? "true" : "false"); | 594 | $axisNode->getTick()->setMajorGrid($axisData->{'axis-grid-major'} ? "true" : "false"); |
594 | - | ||
595 | - //legend | 595 | + if ( $axisData->{'axis-grid-specify-ticks-number'}){ |
596 | + | ||
597 | + if (isset($axisData->{'axis-grid-minor-number'}) && $axisData->{'axis-grid-minor-number'} != 0) | ||
598 | + $axisNode->getTick()->setMinorGridNumber($axisData->{'axis-grid-minor-number'}); | ||
599 | + | ||
600 | + if (isset($axisData->{'axis-grid-major-number'}) && $axisData->{'axis-grid-major-number'} != 0) | ||
601 | + $axisNode->getTick()->setMajorGridNumber($axisData->{'axis-grid-major-number'}); | ||
602 | + }elseif($axisData->{'axis-grid-specify-ticks-spacing'}){ | ||
603 | + | ||
604 | + if (isset($axisData->{'axis-grid-major-space'}) && $axisData->{'axis-grid-major-space'} != 0) | ||
605 | + $axisNode->getTick()->setMajorGridSpace($axisData->{'axis-grid-major-space'}); | ||
606 | + | ||
607 | + if (isset($axisData->{'axis-grid-minor-space'}) && $axisData->{'axis-grid-minor-space'} != 0) | ||
608 | + $axisNode->getTick()->setMinorGridSpace($axisData->{'axis-grid-minor-space'}); | ||
609 | + } | ||
610 | + | ||
611 | + | ||
612 | + //legend | ||
596 | if (isset($axisData->{'axis-legend-text'}) && $axisData->{'axis-legend-text'} != '') | 613 | if (isset($axisData->{'axis-legend-text'}) && $axisData->{'axis-legend-text'} != '') |
597 | { | 614 | { |
598 | $axisNode->getLegend()->setText($axisData->{'axis-legend-text'}); | 615 | $axisNode->getLegend()->setText($axisData->{'axis-legend-text'}); |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotAxisElementNodeClass.php
@@ -20,6 +20,10 @@ define ("REQUESTOUTPUTPLOTAXISELEMENTTICK_NAME", "tick"); | @@ -20,6 +20,10 @@ define ("REQUESTOUTPUTPLOTAXISELEMENTTICK_NAME", "tick"); | ||
20 | define ("REQUESTOUTPUTPLOTAXISELEMENTTICK_POSITION", "position"); | 20 | define ("REQUESTOUTPUTPLOTAXISELEMENTTICK_POSITION", "position"); |
21 | define ("REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRID", "minorGrid"); | 21 | define ("REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRID", "minorGrid"); |
22 | define ("REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRID", "majorGrid"); | 22 | define ("REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRID", "majorGrid"); |
23 | +define ("REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRIDNUMBER", "majorNumber"); | ||
24 | +define ("REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRIDNUMBER", "minorNumber"); | ||
25 | +define ("REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRIDSPACE", "minorSpace"); | ||
26 | +define ("REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRIDSPACE", "majorSpace"); | ||
23 | 27 | ||
24 | define ("REQUESTOUTPUTPLOTAXISELEMENTLEGEND_NAME", "legend"); | 28 | define ("REQUESTOUTPUTPLOTAXISELEMENTLEGEND_NAME", "legend"); |
25 | define ("REQUESTOUTPUTPLOTAXISELEMENTLEGEND_TEXT", "text"); | 29 | define ("REQUESTOUTPUTPLOTAXISELEMENTLEGEND_TEXT", "text"); |
@@ -130,12 +134,56 @@ class RequestOutputPlotAxisElementTickClass extends NodeClass | @@ -130,12 +134,56 @@ class RequestOutputPlotAxisElementTickClass extends NodeClass | ||
130 | { | 134 | { |
131 | return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRID); | 135 | return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRID); |
132 | } | 136 | } |
133 | - | 137 | + |
138 | + public function getMajorGridNumber() | ||
139 | + { | ||
140 | + return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRIDNUMBER); | ||
141 | + } | ||
142 | + | ||
143 | + public function setMajorGridNumber($majorGridNumber) | ||
144 | + { | ||
145 | + $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRIDNUMBER, $majorGridNumber); | ||
146 | + } | ||
147 | + | ||
148 | + public function getMinorGridNumber() | ||
149 | + { | ||
150 | + return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRIDNUMBER); | ||
151 | + } | ||
152 | + | ||
153 | + public function setMinorGridNumber($minorGridNumber) | ||
154 | + { | ||
155 | + $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRIDNUMBER, $minorGridNumber); | ||
156 | + } | ||
157 | + | ||
158 | + public function getMajorGridSpace() | ||
159 | + { | ||
160 | + return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRIDSPACE); | ||
161 | + } | ||
162 | + | ||
163 | + public function setMajorGridSpace($majorGridSpace) | ||
164 | + { | ||
165 | + $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRIDSPACE, $majorGridSpace); | ||
166 | + } | ||
167 | + | ||
168 | + public function getMinorGridSpace() | ||
169 | + { | ||
170 | + return $this->getAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRIDSPACE); | ||
171 | + } | ||
172 | + | ||
173 | + public function setMinorGridSpace($minorGridSpace) | ||
174 | + { | ||
175 | + $this->setAttribute(REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRIDSPACE, $minorGridSpace); | ||
176 | + } | ||
177 | + | ||
134 | public function loadFromNode($xmlNode) | 178 | public function loadFromNode($xmlNode) |
135 | { | 179 | { |
136 | $this->setPosition($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_POSITION)); | 180 | $this->setPosition($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_POSITION)); |
137 | $this->setMinorGrid($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRID)); | 181 | $this->setMinorGrid($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRID)); |
138 | $this->setMajorGrid($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRID)); | 182 | $this->setMajorGrid($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRID)); |
183 | + $this->setMajorGrid($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRIDNUMBER)); | ||
184 | + $this->setMajorGrid($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRIDNUMBER)); | ||
185 | + $this->setMajorGrid($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_MAJORGRIDSPACE)); | ||
186 | + $this->setMajorGrid($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTAXISELEMENTTICK_MINORGRIDSPACE)); | ||
139 | } | 187 | } |
140 | } | 188 | } |
141 | 189 | ||
@@ -327,4 +375,4 @@ class RequestOutputPlotAxisElementNodeClass extends NodeClass | @@ -327,4 +375,4 @@ class RequestOutputPlotAxisElementNodeClass extends NodeClass | ||
327 | } | 375 | } |
328 | } | 376 | } |
329 | 377 | ||
330 | -?> | ||
331 | \ No newline at end of file | 378 | \ No newline at end of file |
379 | +?> |