Commit 2c18297830c7e4f78d560089757caa8de15f0eae

Authored by Erdogan Furkan
1 parent 6593ba1b

First step

config/xsd/request/plot.xsd
... ... @@ -874,6 +874,7 @@
874 874 </xs:complexType>
875 875  
876 876 <xs:complexType name="ParameterIntervalsPropertiesType">
  877 + <xs:attribute name="color" type="xs:string" use="optional"></xs:attribute>
877 878 <xs:attribute name="index" type="xs:string" use="optional"></xs:attribute>
878 879 <xs:attribute name="colorMapIndex" type="xs:integer" use="optional"></xs:attribute>
879 880 </xs:complexType>
... ...
src/ParamOutputImpl/Plot/IntervalsNode.hh
... ... @@ -57,7 +57,23 @@ public:
57 57 intervalsPropsPtr->setIndexDef((const char*) value);
58 58 xmlFree(value);
59 59 }
60   -
  60 + // -- color
  61 + Color color(255, 0, 0);
  62 + value = xmlGetProp(pNode_, (const xmlChar *)"color");
  63 + if (value)
  64 + {
  65 + try
  66 + {
  67 + std::string strValue((const char *)value);
  68 + createColor(color, strValue);
  69 + }
  70 + catch (std::logic_error &e)
  71 + {
  72 + LOG4CXX_WARN(gLogger, "Intervals Color : " << e.what());
  73 + }
  74 + xmlFree(value);
  75 + }
  76 + intervalsPropsPtr->setColor(color);
61 77 // add intervals definition to parameter
62 78 plotOutput->getParameter((const char*)name).addIntervalsProperties(intervalsPropsPtr);
63 79 }
... ...