From bfeb0bae7e2d2eea0ca545df1e3c92dc973f9236 Mon Sep 17 00:00:00 2001 From: Furkan Date: Mon, 28 Oct 2024 15:58:54 +0000 Subject: [PATCH] #9629 - Done --- config/xsd/request/plot.xsd | 3 +++ src/ParamOutputImpl/Plot/Scatter/XYPlot.cc | 6 ++++++ src/ParamOutputImpl/Plot/TimeTickLastSymbolNode.hh | 41 +++++++++++++++++++++++++++++++++++++++++ src/ParamOutputImpl/Plot/TimeTickNode.hh | 3 +++ src/ParamOutputImpl/Plot/TimeTickProperties.cc | 2 ++ src/ParamOutputImpl/Plot/TimeTickProperties.hh | 13 ++++++++++++- 6 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 src/ParamOutputImpl/Plot/TimeTickLastSymbolNode.hh diff --git a/config/xsd/request/plot.xsd b/config/xsd/request/plot.xsd index 37639a3..372b21e 100644 --- a/config/xsd/request/plot.xsd +++ b/config/xsd/request/plot.xsd @@ -1166,6 +1166,9 @@ + + diff --git a/src/ParamOutputImpl/Plot/Scatter/XYPlot.cc b/src/ParamOutputImpl/Plot/Scatter/XYPlot.cc index 440e20a..531e96b 100644 --- a/src/ParamOutputImpl/Plot/Scatter/XYPlot.cc +++ b/src/ParamOutputImpl/Plot/Scatter/XYPlot.cc @@ -582,6 +582,12 @@ void XYPlot::drawTimeTicks(SeriesProperties& pSeries, AMDA::Common::ParameterInd ttProps.getSymbol().getSize(), 1., ttProps.getSymbol().getColor(), nbTotMajor-1, &majorX[1], &majorY[1]); + + drawSymbols( + ttProps.getLastSymbol().getType(), + ttProps.getLastSymbol().getSize(), 1., + ttProps.getLastSymbol().getColor(), + 1, &majorX[curMajorGrad-1], &majorY[curMajorGrad-1]); } if (nbTotMinor != 0) { diff --git a/src/ParamOutputImpl/Plot/TimeTickLastSymbolNode.hh b/src/ParamOutputImpl/Plot/TimeTickLastSymbolNode.hh new file mode 100644 index 0000000..647b133 --- /dev/null +++ b/src/ParamOutputImpl/Plot/TimeTickLastSymbolNode.hh @@ -0,0 +1,41 @@ +/** + * TimeTickLastSymbolNode.hh + * + * Created on: 20 Oct 2024 + * Author: Furkan - AKKODIS + */ + +#ifndef TIMETICKLASTSYMBOLNODE_HH_ +#define TIMETICKLASTSYMBOLNODE_HH_ + +#include +#include + +#include "NodeCfg.hh" +#include "AbstractSymbolNode.hh" + + +namespace plot { + +class TimeTickLastSymbolNode: public AbstractSymbolNode { + +public: + TimeTickLastSymbolNode() : + AbstractSymbolNode() { + } + virtual ~TimeTickLastSymbolNode() { + } + + SymbolProperties & getSymbolProperties (const AMDA::Parameters::CfgContext& context_) { + DrawingProperties* pProps = context_.get(); + + // Return symbol properties relative to the first time tick symbol + return pProps->getTimeTickProperties().getLastSymbol(); + } + + +}; + +} /* namespace plot */ + +#endif /* TIMETICKLASTSYMBOLNODE_HH_ */ diff --git a/src/ParamOutputImpl/Plot/TimeTickNode.hh b/src/ParamOutputImpl/Plot/TimeTickNode.hh index f5d2ec6..129b31b 100644 --- a/src/ParamOutputImpl/Plot/TimeTickNode.hh +++ b/src/ParamOutputImpl/Plot/TimeTickNode.hh @@ -17,6 +17,7 @@ #include "CommonNode.hh" #include "TimeTickSymbolNode.hh" #include "TimeTickFirstSymbolNode.hh" +#include "TimeTickLastSymbolNode.hh" namespace plot { @@ -35,6 +36,8 @@ public: new TimeTickSymbolNode() ); getChildList()["firstSymbol"] = AMDA::XMLConfigurator::NodeCfgSPtr( new TimeTickFirstSymbolNode() ); + getChildList()["lastSymbol"] = AMDA::XMLConfigurator::NodeCfgSPtr( + new TimeTickLastSymbolNode() ); }; virtual ~TimeTickNode(){}; void proceed(xmlNodePtr ,const AMDA::Parameters::CfgContext& ); diff --git a/src/ParamOutputImpl/Plot/TimeTickProperties.cc b/src/ParamOutputImpl/Plot/TimeTickProperties.cc index 28cc497..b2c37d5 100644 --- a/src/ParamOutputImpl/Plot/TimeTickProperties.cc +++ b/src/ParamOutputImpl/Plot/TimeTickProperties.cc @@ -18,6 +18,7 @@ std::ostream& operator<<(std::ostream& out_, const TimeTickProperties& prop_) { out_ << " color =" << prop_._color << std::endl; out_ << " " << prop_.getFont() << std::endl; out_ << " " << prop_._firstSymbol << std::endl; + out_ << " " << prop_._lastSymbol << std::endl; out_ << " " << prop_._symbol << std::endl; out_ << "}" << std::endl; return out_; @@ -35,6 +36,7 @@ void TimeTickProperties::dump(std::ostream& out_, std::string& prefix_) { std::string subPrefix = prefix_ + "timeTick."; _font.dump(out_, subPrefix); _firstSymbol.dump(out_, subPrefix); + _lastSymbol.dump(out_, subPrefix); _symbol.dump(out_, subPrefix); } diff --git a/src/ParamOutputImpl/Plot/TimeTickProperties.hh b/src/ParamOutputImpl/Plot/TimeTickProperties.hh index 7b5a2a7..c33b47c 100644 --- a/src/ParamOutputImpl/Plot/TimeTickProperties.hh +++ b/src/ParamOutputImpl/Plot/TimeTickProperties.hh @@ -31,7 +31,7 @@ public: void dump(std::ostream& out_, std::string& prefix_); TimeTickProperties() : - _step("0"), _number(0), _minor(0), _firstSymbol(), _symbol(), _color(), _font("sans-serif", 11) + _step("0"), _number(0), _minor(0), _firstSymbol(), _lastSymbol(), _symbol(), _color(), _font("sans-serif", 11) { } TimeTickProperties(const TimeTickProperties& pTimeTickProperties_) : @@ -39,6 +39,7 @@ public: _number(pTimeTickProperties_._number), _minor(pTimeTickProperties_._minor), _firstSymbol(pTimeTickProperties_._firstSymbol), + _lastSymbol(pTimeTickProperties_._lastSymbol), _symbol(pTimeTickProperties_._symbol), _color(pTimeTickProperties_._color), _font(pTimeTickProperties_._font) @@ -50,6 +51,7 @@ public: _number = pTimeTickProperties_._number; _minor = pTimeTickProperties_._minor; _firstSymbol = pTimeTickProperties_._firstSymbol; + _lastSymbol = pTimeTickProperties_._lastSymbol; _symbol = pTimeTickProperties_._symbol; _color = pTimeTickProperties_._color; _font = pTimeTickProperties_._font; @@ -67,6 +69,14 @@ public: _firstSymbol = firstSymbol; } + SymbolProperties& getLastSymbol() { + return _lastSymbol; + } + + void setLastSymbol(const SymbolProperties& lastSymbol) { + _lastSymbol = lastSymbol; + } + const Font& getFont() const { return _font; } @@ -122,6 +132,7 @@ private: int _minor; SymbolProperties _firstSymbol; + SymbolProperties _lastSymbol; SymbolProperties _symbol; Color _color; -- libgit2 0.21.2