Commit bfeb0bae7e2d2eea0ca545df1e3c92dc973f9236
1 parent
b942a2cc
Exists in
amdadev
and in
2 other branches
#9629 - Done
Showing
6 changed files
with
67 additions
and
1 deletions
Show diff stats
config/xsd/request/plot.xsd
... | ... | @@ -1166,6 +1166,9 @@ |
1166 | 1166 | <xs:element name="firstSymbol" type="SymbolType" |
1167 | 1167 | minOccurs="0" maxOccurs="1"> |
1168 | 1168 | </xs:element> |
1169 | + <xs:element name="lastSymbol" type="SymbolType" | |
1170 | + minOccurs="0" maxOccurs="1"> | |
1171 | + </xs:element> | |
1169 | 1172 | <xs:element name="font" type="FontType" minOccurs="0" |
1170 | 1173 | maxOccurs="1"> |
1171 | 1174 | </xs:element> | ... | ... |
src/ParamOutputImpl/Plot/Scatter/XYPlot.cc
... | ... | @@ -582,6 +582,12 @@ void XYPlot::drawTimeTicks(SeriesProperties& pSeries, AMDA::Common::ParameterInd |
582 | 582 | ttProps.getSymbol().getSize(), 1., |
583 | 583 | ttProps.getSymbol().getColor(), |
584 | 584 | nbTotMajor-1, &majorX[1], &majorY[1]); |
585 | + | |
586 | + drawSymbols( | |
587 | + ttProps.getLastSymbol().getType(), | |
588 | + ttProps.getLastSymbol().getSize(), 1., | |
589 | + ttProps.getLastSymbol().getColor(), | |
590 | + 1, &majorX[curMajorGrad-1], &majorY[curMajorGrad-1]); | |
585 | 591 | } |
586 | 592 | |
587 | 593 | if (nbTotMinor != 0) { | ... | ... |
... | ... | @@ -0,0 +1,41 @@ |
1 | +/** | |
2 | + * TimeTickLastSymbolNode.hh | |
3 | + * | |
4 | + * Created on: 20 Oct 2024 | |
5 | + * Author: Furkan - AKKODIS | |
6 | + */ | |
7 | + | |
8 | +#ifndef TIMETICKLASTSYMBOLNODE_HH_ | |
9 | +#define TIMETICKLASTSYMBOLNODE_HH_ | |
10 | + | |
11 | +#include <libxml/tree.h> | |
12 | +#include <iosfwd> | |
13 | + | |
14 | +#include "NodeCfg.hh" | |
15 | +#include "AbstractSymbolNode.hh" | |
16 | + | |
17 | + | |
18 | +namespace plot { | |
19 | + | |
20 | +class TimeTickLastSymbolNode: public AbstractSymbolNode { | |
21 | + | |
22 | +public: | |
23 | + TimeTickLastSymbolNode() : | |
24 | + AbstractSymbolNode() { | |
25 | + } | |
26 | + virtual ~TimeTickLastSymbolNode() { | |
27 | + } | |
28 | + | |
29 | + SymbolProperties & getSymbolProperties (const AMDA::Parameters::CfgContext& context_) { | |
30 | + DrawingProperties* pProps = context_.get<DrawingProperties*>(); | |
31 | + | |
32 | + // Return symbol properties relative to the first time tick symbol | |
33 | + return pProps->getTimeTickProperties().getLastSymbol(); | |
34 | + } | |
35 | + | |
36 | + | |
37 | +}; | |
38 | + | |
39 | +} /* namespace plot */ | |
40 | + | |
41 | +#endif /* TIMETICKLASTSYMBOLNODE_HH_ */ | ... | ... |
src/ParamOutputImpl/Plot/TimeTickNode.hh
... | ... | @@ -17,6 +17,7 @@ |
17 | 17 | #include "CommonNode.hh" |
18 | 18 | #include "TimeTickSymbolNode.hh" |
19 | 19 | #include "TimeTickFirstSymbolNode.hh" |
20 | +#include "TimeTickLastSymbolNode.hh" | |
20 | 21 | |
21 | 22 | namespace plot { |
22 | 23 | |
... | ... | @@ -35,6 +36,8 @@ public: |
35 | 36 | new TimeTickSymbolNode() ); |
36 | 37 | getChildList()["firstSymbol"] = AMDA::XMLConfigurator::NodeCfgSPtr( |
37 | 38 | new TimeTickFirstSymbolNode() ); |
39 | + getChildList()["lastSymbol"] = AMDA::XMLConfigurator::NodeCfgSPtr( | |
40 | + new TimeTickLastSymbolNode() ); | |
38 | 41 | }; |
39 | 42 | virtual ~TimeTickNode(){}; |
40 | 43 | void proceed(xmlNodePtr ,const AMDA::Parameters::CfgContext& ); | ... | ... |
src/ParamOutputImpl/Plot/TimeTickProperties.cc
... | ... | @@ -18,6 +18,7 @@ std::ostream& operator<<(std::ostream& out_, const TimeTickProperties& prop_) { |
18 | 18 | out_ << " color =" << prop_._color << std::endl; |
19 | 19 | out_ << " " << prop_.getFont() << std::endl; |
20 | 20 | out_ << " " << prop_._firstSymbol << std::endl; |
21 | + out_ << " " << prop_._lastSymbol << std::endl; | |
21 | 22 | out_ << " " << prop_._symbol << std::endl; |
22 | 23 | out_ << "}" << std::endl; |
23 | 24 | return out_; |
... | ... | @@ -35,6 +36,7 @@ void TimeTickProperties::dump(std::ostream& out_, std::string& prefix_) { |
35 | 36 | std::string subPrefix = prefix_ + "timeTick."; |
36 | 37 | _font.dump(out_, subPrefix); |
37 | 38 | _firstSymbol.dump(out_, subPrefix); |
39 | + _lastSymbol.dump(out_, subPrefix); | |
38 | 40 | _symbol.dump(out_, subPrefix); |
39 | 41 | } |
40 | 42 | ... | ... |
src/ParamOutputImpl/Plot/TimeTickProperties.hh
... | ... | @@ -31,7 +31,7 @@ public: |
31 | 31 | void dump(std::ostream& out_, std::string& prefix_); |
32 | 32 | |
33 | 33 | TimeTickProperties() : |
34 | - _step("0"), _number(0), _minor(0), _firstSymbol(), _symbol(), _color(), _font("sans-serif", 11) | |
34 | + _step("0"), _number(0), _minor(0), _firstSymbol(), _lastSymbol(), _symbol(), _color(), _font("sans-serif", 11) | |
35 | 35 | { |
36 | 36 | } |
37 | 37 | TimeTickProperties(const TimeTickProperties& pTimeTickProperties_) : |
... | ... | @@ -39,6 +39,7 @@ public: |
39 | 39 | _number(pTimeTickProperties_._number), |
40 | 40 | _minor(pTimeTickProperties_._minor), |
41 | 41 | _firstSymbol(pTimeTickProperties_._firstSymbol), |
42 | + _lastSymbol(pTimeTickProperties_._lastSymbol), | |
42 | 43 | _symbol(pTimeTickProperties_._symbol), |
43 | 44 | _color(pTimeTickProperties_._color), |
44 | 45 | _font(pTimeTickProperties_._font) |
... | ... | @@ -50,6 +51,7 @@ public: |
50 | 51 | _number = pTimeTickProperties_._number; |
51 | 52 | _minor = pTimeTickProperties_._minor; |
52 | 53 | _firstSymbol = pTimeTickProperties_._firstSymbol; |
54 | + _lastSymbol = pTimeTickProperties_._lastSymbol; | |
53 | 55 | _symbol = pTimeTickProperties_._symbol; |
54 | 56 | _color = pTimeTickProperties_._color; |
55 | 57 | _font = pTimeTickProperties_._font; |
... | ... | @@ -67,6 +69,14 @@ public: |
67 | 69 | _firstSymbol = firstSymbol; |
68 | 70 | } |
69 | 71 | |
72 | + SymbolProperties& getLastSymbol() { | |
73 | + return _lastSymbol; | |
74 | + } | |
75 | + | |
76 | + void setLastSymbol(const SymbolProperties& lastSymbol) { | |
77 | + _lastSymbol = lastSymbol; | |
78 | + } | |
79 | + | |
70 | 80 | const Font& getFont() const { |
71 | 81 | return _font; |
72 | 82 | } |
... | ... | @@ -122,6 +132,7 @@ private: |
122 | 132 | int _minor; |
123 | 133 | |
124 | 134 | SymbolProperties _firstSymbol; |
135 | + SymbolProperties _lastSymbol; | |
125 | 136 | SymbolProperties _symbol; |
126 | 137 | Color _color; |
127 | 138 | ... | ... |