Commit cb46dfbf89f80a0a30406a7a721971756675257f
1 parent
33576919
Exists in
master
and in
63 other branches
Fix orbit serie and instant serie definition
Showing
4 changed files
with
34 additions
and
30 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
... | ... | @@ -779,7 +779,7 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
779 | 779 | } |
780 | 780 | else |
781 | 781 | { |
782 | - $orbitSerie = $paramNode->addOrbitSerie($paramData->{'param-drawing-object'}->{'serie-yaxis'}, $xAxis, $colorSerieId); | |
782 | + $orbitSerie = $paramNode->addOrbitSerie($paramData->{'param-drawing-object'}->{'serie-yaxis'}, $colorSerieId); | |
783 | 783 | $orbitSerie->setId($paramData->{'id'}); |
784 | 784 | $serieNodes[] = $orbitSerie; |
785 | 785 | } |
... | ... | @@ -968,7 +968,7 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
968 | 968 | |
969 | 969 | protected function unmarshallInstantSerie($paramDrawingData, $plotNode, $paramNode) |
970 | 970 | { |
971 | - $iserieNode = $paramNode->addInstantSerie(REQUESTOUTPUTPLOTELEMENTXY_XAXISID, 'y-left'); | |
971 | + $iserieNode = $paramNode->addInstantSerie('y-left'); | |
972 | 972 | |
973 | 973 | //Table on X Axis |
974 | 974 | $iserieNode->setTableOnXAxis($paramDrawingData->{'iserie-tableonx'} ? "true" : "false"); |
... | ... | @@ -991,7 +991,7 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
991 | 991 | protected function unmarshallInstantSpectro($paramDrawingData, $plotNode, $paramNode, $indexes) |
992 | 992 | { |
993 | 993 | //TBD how to process inexes if they are defined ? |
994 | - $spectroNode = $paramNode->addInstantSpectro(REQUESTOUTPUTPLOTELEMENTXY_XAXISID, 'y-left', $paramDrawingData->{'ispectro-dimonxaxis'}); | |
994 | + $spectroNode = $paramNode->addInstantSpectro('y-left', $paramDrawingData->{'ispectro-dimonxaxis'}); | |
995 | 995 | } |
996 | 996 | |
997 | 997 | protected function unmarshallStatusBar($paramDrawingData, $paramNode, $indexes) |
... | ... |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotBaseSerieNodeClass.php
... | ... | @@ -7,7 +7,6 @@ require_once "RequestOutputPlotSerieIntervalTicksNodeClass.php"; |
7 | 7 | |
8 | 8 | define ("REQUESTOUTPUTPLOTBASESERIE_XAXIS", "xAxis"); |
9 | 9 | define ("REQUESTOUTPUTPLOTBASESERIE_YAXIS", "yAxis"); |
10 | -define ("REQUESTOUTPUTPLOTBASESERIE_XID", "xId"); | |
11 | 10 | define ("REQUESTOUTPUTPLOTBASESERIE_COLORSERIEID", "colorSerieId"); |
12 | 11 | define ("REQUESTOUTPUTPLOTBASESERIE_MIN", "min"); |
13 | 12 | define ("REQUESTOUTPUTPLOTBASESERIE_MAX", "max"); |
... | ... | @@ -29,24 +28,24 @@ class RequestOutputPlotBaseSerieNodeClass extends NodeClass |
29 | 28 | parent::__construct($name); |
30 | 29 | } |
31 | 30 | |
32 | - public function setYAxisId($axisId) | |
31 | + public function setXAxisId($axisId) | |
33 | 32 | { |
34 | - $this->setAttribute(REQUESTOUTPUTPLOTBASESERIE_YAXIS, $axisId); | |
33 | + $this->setAttribute(REQUESTOUTPUTPLOTBASESERIE_XAXIS, $axisId); | |
35 | 34 | } |
36 | 35 | |
37 | - public function getYAxisId() | |
36 | + public function getXAxisId() | |
38 | 37 | { |
39 | - return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_YAXIS); | |
38 | + return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_XAXIS); | |
40 | 39 | } |
41 | - | |
42 | - public function setXId($xId) | |
40 | + | |
41 | + public function setYAxisId($axisId) | |
43 | 42 | { |
44 | - $this->setAttribute(REQUESTOUTPUTPLOTBASESERIE_XID, $xId); | |
43 | + $this->setAttribute(REQUESTOUTPUTPLOTBASESERIE_YAXIS, $axisId); | |
45 | 44 | } |
46 | - | |
47 | - public function getXId() | |
45 | + | |
46 | + public function getYAxisId() | |
48 | 47 | { |
49 | - return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_XID); | |
48 | + return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_YAXIS); | |
50 | 49 | } |
51 | 50 | |
52 | 51 | public function setColorSerieId($colorSerieId) |
... | ... |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotParamsNodeClass.php
... | ... | @@ -83,21 +83,21 @@ class RequestOutputPlotParamNodeClass extends NodeClass |
83 | 83 | return $ySerieNode; |
84 | 84 | } |
85 | 85 | |
86 | - public function addOrbitSerie($yAxis, $xId, $colorSerieId = -1) | |
86 | + public function addOrbitSerie($yAxis, $colorSerieId = -1) | |
87 | 87 | { |
88 | 88 | $orbitSerieNode = new RequestOutputPlotOrbitSerieNodeClass(); |
89 | + $orbitSerieNode->setXAxisId(REQUESTOUTPUTPLOTELEMENTXY_XAXISID); | |
89 | 90 | $orbitSerieNode->setYAxisId($yAxis); |
90 | - $orbitSerieNode->setXId($xId); | |
91 | 91 | if ($colorSerieId >= 0) |
92 | 92 | $orbitSerieNode->setColorSerieId($colorSerieId); |
93 | 93 | $this->addChild($orbitSerieNode); |
94 | 94 | return $orbitSerieNode; |
95 | 95 | } |
96 | 96 | |
97 | - public function addInstantSerie($xId, $yAxis) | |
97 | + public function addInstantSerie($yAxis) | |
98 | 98 | { |
99 | 99 | $iserieNode = new RequestOutputPlotInstantSerieNodeClass(); |
100 | - $iserieNode->setXId($xId); | |
100 | + $iserieNode->setXAxisId(REQUESTOUTPUTPLOTELEMENTXY_XAXISID); | |
101 | 101 | $iserieNode->setYAxisId($yAxis); |
102 | 102 | $this->addChild($iserieNode); |
103 | 103 | return $iserieNode; |
... | ... | @@ -118,10 +118,10 @@ class RequestOutputPlotParamNodeClass extends NodeClass |
118 | 118 | return $spectroNode; |
119 | 119 | } |
120 | 120 | |
121 | - public function addInstantSpectro($xId, $yAxis, $dimOnXAxis, $index = NULL, $min = NULL, $max = NULL) | |
121 | + public function addInstantSpectro($yAxis, $dimOnXAxis, $index = NULL, $min = NULL, $max = NULL) | |
122 | 122 | { |
123 | 123 | $ispectroNode = new NodeClass(REQUESTOUTPUTPLOTINSTANTSPECTRO_NAME); |
124 | - $ispectroNode->setAttribute(REQUESTOUTPUTPLOTINSTANTSPECTRO_ID, $xId); | |
124 | + $ispectroNode->setAttribute(REQUESTOUTPUTPLOTINSTANTSPECTRO_XAXIS, REQUESTOUTPUTPLOTELEMENTXY_XAXISID); | |
125 | 125 | $ispectroNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_YAXIS, $yAxis); |
126 | 126 | $ispectroNode->setAttribute(REQUESTOUTPUTPLOTINSTANTSPECTRO_DIMONXAXIS, $dimOnXAxis); |
127 | 127 | |
... | ... |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotYSerieNodeClass.php
... | ... | @@ -6,6 +6,7 @@ require_once "RequestOutputPlotYSerieErrorBarNodeClass.php"; |
6 | 6 | define ("REQUESTOUTPUTPLOTYSERIE_XYPLOT_NAME", "yserie"); |
7 | 7 | define ("REQUESTOUTPUTPLOTYSERIE_TIMEPLOT_NAME", "serie"); |
8 | 8 | |
9 | +define ("REQUESTOUTPUTPLOTYSERIE_XID", "xId"); | |
9 | 10 | define ("REQUESTOUTPUTPLOTYSERIE_INDEX", "index"); |
10 | 11 | define ("REQUESTOUTPUTPLOTYSERIE_RESAMPLING", "resampling"); |
11 | 12 | define ("REQUESTOUTPUTPLOTYSERIE_ERRORBAR", "errorBar"); |
... | ... | @@ -22,16 +23,6 @@ class RequestOutputPlotYSerieNodeClass extends RequestOutputPlotBaseSerieNodeCla |
22 | 23 | parent::__construct($name); |
23 | 24 | } |
24 | 25 | |
25 | - public function setXAxisId($axisId) | |
26 | - { | |
27 | - $this->setAttribute(REQUESTOUTPUTPLOTBASESERIE_XAXIS, $axisId); | |
28 | - } | |
29 | - | |
30 | - public function getXAxisId() | |
31 | - { | |
32 | - return $this->getAttribute(REQUESTOUTPUTPLOTBASESERIE_XAXIS); | |
33 | - } | |
34 | - | |
35 | 26 | public function setIndex($index) |
36 | 27 | { |
37 | 28 | $this->setAttribute(REQUESTOUTPUTPLOTYSERIE_INDEX, $index); |
... | ... | @@ -41,6 +32,16 @@ class RequestOutputPlotYSerieNodeClass extends RequestOutputPlotBaseSerieNodeCla |
41 | 32 | { |
42 | 33 | return $this->getAttribute(REQUESTOUTPUTPLOTYSERIE_INDEX); |
43 | 34 | } |
35 | + | |
36 | + public function setXId($xId) | |
37 | + { | |
38 | + $this->setAttribute(REQUESTOUTPUTPLOTYSERIE_XID, $xId); | |
39 | + } | |
40 | + | |
41 | + public function getXId() | |
42 | + { | |
43 | + return $this->getAttribute(REQUESTOUTPUTPLOTYSERIE_XID); | |
44 | + } | |
44 | 45 | |
45 | 46 | public function getResampling() |
46 | 47 | { |
... | ... | @@ -71,6 +72,10 @@ class RequestOutputPlotYSerieNodeClass extends RequestOutputPlotBaseSerieNodeCla |
71 | 72 | public function loadFromNode($xmlNode) |
72 | 73 | { |
73 | 74 | $this->setIndex($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTYSERIE_INDEX)); |
75 | + | |
76 | + $xId = $this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTYSERIE_XID); | |
77 | + if (!empty($xId)) | |
78 | + $this->setXId($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTYSERIE_XID)); | |
74 | 79 | |
75 | 80 | $resamplingXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTYSERIE_RESAMPLING); |
76 | 81 | if (isset($resamplingXmlNode)) |
... | ... |