Commit ee56181e153771a2d9df4621eeb8a6d8d338c684

Authored by Benjamin Renard
1 parent 0f5e687b

Also give the possibility to use a different symbol for last interval tick

src/InputOutput/IHMImpl/ParamInfo/IHMInputOutputParamInfoClass.php
... ... @@ -586,6 +586,11 @@ class IHMInputOutputParamInfoClass implements InputOutputInterface
586 586 $this->unmarshallSymbolData($drawNode->getIntervalTicks()->getSymbol(), "serie-intervaltick-", $result_array);
587 587 }
588 588  
  589 + if ($drawNode->getIntervalTicks()->isLastSymbolDefined()) {
  590 + $result_array['serie-intervaltick-lastsymbols-activated'] = true;
  591 + $this->unmarshallSymbolData($drawNode->getIntervalTicks()->getLastSymbol(), "serie-intervaltick-lastsymbols-", $result_array);
  592 + }
  593 +
589 594 if ($drawNode->getIntervalTicks()->isFontDefined()) {
590 595 $result_array['serie-intervaltick-font-activated'] = true;
591 596 $this->unmarshallFontData($drawNode->getIntervalTicks()->getFont(), "serie-intervaltick-font-", $result_array);
... ...
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
... ... @@ -996,6 +996,10 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
996 996 //Symbol
997 997 $this->unmarshallSymbol($serieData, 'serie-intervaltick-symbols', $intervalTickNode->getSymbol());
998 998  
  999 + //Last Symbol
  1000 + if ($serieData->{'serie-intervaltick-lastsymbols-activated'})
  1001 + $this->unmarshallSymbol($serieData, 'serie-intervaltick-lastsymbols', $intervalTickNode->getLastSymbol());
  1002 +
999 1003 //Font
1000 1004 if ($serieData->{'serie-intervaltick-font-activated'})
1001 1005 $this->unmarshallFont($serieData, 'serie-intervaltick-font', $intervalTickNode->getFont());
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotSerieIntervalTicksNodeClass.php
... ... @@ -3,6 +3,7 @@
3 3 define ("REQUESTOUTPUTPLOTSERIEINTERVALTICKS_MODE", "mode");
4 4 define ("REQUESTOUTPUTPLOTSERIEINTERVALTICKS_COLOR", "color");
5 5 define ("REQUESTOUTPUTPLOTSERIEINTERVALTICKS_SYMBOL", "symbol");
  6 +define ("REQUESTOUTPUTPLOTSERIETIMETICKS_LASTSYMBOL", "lastSymbol");
6 7  
7 8 abstract class RequestOutputPlotSerieIntervalTicksModeEnum
8 9 {
... ... @@ -62,6 +63,25 @@ class RequestOutputPlotSerieIntervalTicksNodeClass extends NodeClass
62 63  
63 64 return $node;
64 65 }
  66 +
  67 + public function isLastSymbolDefined()
  68 + {
  69 + $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTSERIETIMETICKS_LASTSYMBOL);
  70 + return isset($node);
  71 + }
  72 +
  73 + public function getLastSymbol()
  74 + {
  75 + $node = $this->getFirstChildByName(REQUESTOUTPUTPLOTSERIETIMETICKS_LASTSYMBOL);
  76 +
  77 + if (!isset($node))
  78 + {
  79 + $node = new RequestOutputPlotSymbolNodeClass(REQUESTOUTPUTPLOTSERIETIMETICKS_LASTSYMBOL);
  80 + $this->addChild($node);
  81 + }
  82 +
  83 + return $node;
  84 + }
65 85  
66 86 public function isFontDefined()
67 87 {
... ... @@ -90,6 +110,10 @@ class RequestOutputPlotSerieIntervalTicksNodeClass extends NodeClass
90 110 $symbolXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTSERIEINTERVALTICKS_SYMBOL);
91 111 if (isset($symbolXmlNode))
92 112 $this->getSymbol()->loadFromNode($symbolXmlNode);
  113 +
  114 + $lastsymbolXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_LASTSYMBOL);
  115 + if (isset($lastsymbolXmlNode))
  116 + $this->getLastSymbol()->loadFromNode($lastsymbolXmlNode);
93 117  
94 118 $fontXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTFONT_NODENAME);
95 119 if (isset($fontXmlNode))
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotSerieTimeTicksNodeClass.php
... ... @@ -146,6 +146,7 @@ class RequestOutputPlotSerieTimeTicksNodeClass extends NodeClass
146 146 $firstsymbolXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_FIRSTSYMBOL);
147 147 if (isset($firstsymbolXmlNode))
148 148 $this->getFirstSymbol()->loadFromNode($firstsymbolXmlNode);
  149 +
149 150 $lastsymbolXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTSERIETIMETICKS_LASTSYMBOL);
150 151 if (isset($lastsymbolXmlNode))
151 152 $this->getLastSymbol()->loadFromNode($lastsymbolXmlNode);
... ...