Commit 60a1a56360e17d33ff684465b793329f1f8ae922
1 parent
fb7f73aa
Exists in
master
and in
58 other branches
Add the possibility to define a resolution for each parameters of a plot request (#4784)
Showing
3 changed files
with
16 additions
and
61 deletions
Show diff stats
config/plotConfig.xml deleted
@@ -1,60 +0,0 @@ | @@ -1,60 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<root> | ||
3 | - <default> | ||
4 | - <page dimension="ISO A4" orientation="landscape" mode="color" dpi="90"> | ||
5 | - <font name="sans-serif" size="8" /> | ||
6 | - <margin x="5" y="5" /> <!-- in mm --> | ||
7 | - </page> | ||
8 | - <panel resolution="3000" backgroundColor="[255,255,255]"> <!-- charSizeUnits defines space to set all around plot area --> | ||
9 | - <title position="top" align="center" /> | ||
10 | - <timeAxis id="timeAxis" format="dd/mm/yy" reverse="false" color="[0,0,0]" position="bottom" thickness="1"> | ||
11 | - <legend text="Time, UT" /> | ||
12 | - </timeAxis> | ||
13 | - <epochAxis id="epochAxis" format="dd/mm/yy" reverse="false" color="[0,0,0]" position="bottom" thickness="1"> | ||
14 | - <legend text="Relative Time" /> | ||
15 | - </epochAxis> | ||
16 | - <colorAxis id="colorAxis" scale="linear" color="[0,0,0]" reverse="false" position="right" /> | ||
17 | - <xAxis scale="linear" reverse="false" color="[0,0,0]" position="bottom" thickness="1" /> | ||
18 | - <yAxis scale="linear" reverse="false" color="[0,0,0]" position="left" thickness="1" /> | ||
19 | - <timePlot xAxis="timeAxis" zAxis="colorAxis"> | ||
20 | - <line type="line" style="plain" width="1" /> | ||
21 | - <symbol type="no" size="4" /> | ||
22 | - </timePlot> | ||
23 | - <epochPlot xAxis="epochAxis" zAxis="colorAxis"> | ||
24 | - <line type="line" style="plain" width="1" /> | ||
25 | - <symbol type="no" size="4" color="[0,0,255]" /> | ||
26 | - </epochPlot> | ||
27 | - <xyPlot zAxis="colorAxis"> | ||
28 | - <line type="no" style="plain" width="1" /> | ||
29 | - <symbol type="dot" size="4" /> | ||
30 | - <resampling type="auto"/> | ||
31 | - <timeTick step="0" number="0" minor="0" color="[0,0,0]"> | ||
32 | - <font name="sans-serif" size="5" style="upright" weight="medium" /> | ||
33 | - <firstSymbol type="triangle" size="5" color="[120,0,0]" /> | ||
34 | - <symbol type="circle" size="5" color="[120,120,0]" /> | ||
35 | - </timeTick> | ||
36 | - </xyPlot> | ||
37 | - <instantPlot zAxis="colorAxis"> | ||
38 | - <line type="no" style="plain" color="[255,0,0]" width="1" /> | ||
39 | - <symbol type="dot" size="4" color="[0,0,255]" /> | ||
40 | - </instantPlot> | ||
41 | - </panel> | ||
42 | - </default> | ||
43 | - <colormap path="plplot/"> | ||
44 | - <grayscale default="0"> <!-- default is map index used for auto line color generation --> | ||
45 | - <file index="0">cmap0_black_on_white.pal</file> | ||
46 | - <file index="1">cmap1_gray.pal</file> | ||
47 | - </grayscale> | ||
48 | - <color default="0"> | ||
49 | - <file index="0">cmap0_default.pal</file> | ||
50 | - <file index="1">cmap1_default.pal</file> | ||
51 | - <file index="2">cmap0_test.pal</file> | ||
52 | - </color> | ||
53 | - <coloraxis default="0"> | ||
54 | - <file index="0">cmap1_default.pal</file> | ||
55 | - <file index="1">cmap1_blue_red.pal</file> | ||
56 | - <file index="2">cmap1_blue_yellow.pal</file> | ||
57 | - <file index="3">cmap1_gray.pal</file> | ||
58 | - </coloraxis> | ||
59 | - </colormap> | ||
60 | -</root> |
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
@@ -387,7 +387,7 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | @@ -387,7 +387,7 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | ||
387 | //Panel background color | 387 | //Panel background color |
388 | if (($panelData->{'panel-background-color'} != 'none') && ($panelData->{'panel-background-color'} != '')) | 388 | if (($panelData->{'panel-background-color'} != 'none') && ($panelData->{'panel-background-color'} != '')) |
389 | $panelNode->setBackgroundColor($this->hexColor2KernelColor($panelData->{'panel-background-color'})); | 389 | $panelNode->setBackgroundColor($this->hexColor2KernelColor($panelData->{'panel-background-color'})); |
390 | - | 390 | + |
391 | //Panel font | 391 | //Panel font |
392 | $this->unmarshallFont($panelData, 'panel-font', $panelNode->getFont()); | 392 | $this->unmarshallFont($panelData, 'panel-font', $panelNode->getFont()); |
393 | 393 | ||
@@ -767,6 +767,8 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | @@ -767,6 +767,8 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | ||
767 | { | 767 | { |
768 | $serieNode = $paramNode->addYSerie($paramData->{'param-drawing-object'}->{'serie-yaxis'}, -1, $xId, $colorSerieId, $paramData->{'param-drawing-object'}->{'serie-value-min'}, $paramData->{'param-drawing-object'}->{'serie-value-max'}); | 768 | $serieNode = $paramNode->addYSerie($paramData->{'param-drawing-object'}->{'serie-yaxis'}, -1, $xId, $colorSerieId, $paramData->{'param-drawing-object'}->{'serie-value-min'}, $paramData->{'param-drawing-object'}->{'serie-value-max'}); |
769 | $serieNode->setId($paramData->{'id'}); | 769 | $serieNode->setId($paramData->{'id'}); |
770 | + if (!empty($paramData->{'param-drawing-object'}->{'serie-resolution'})) | ||
771 | + $serieNode->setResolution($paramData->{'param-drawing-object'}->{'serie-resolution'}); | ||
770 | $serieNodes[] = $serieNode; | 772 | $serieNodes[] = $serieNode; |
771 | } | 773 | } |
772 | foreach ($indexes as $index) | 774 | foreach ($indexes as $index) |
@@ -774,6 +776,8 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | @@ -774,6 +776,8 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | ||
774 | $serieNode = $paramNode->addYSerie($paramData->{'param-drawing-object'}->{'serie-yaxis'}, $index, $xId, $colorSerieId, $paramData->{'param-drawing-object'}->{'serie-value-min'}, $paramData->{'param-drawing-object'}->{'serie-value-max'}); | 776 | $serieNode = $paramNode->addYSerie($paramData->{'param-drawing-object'}->{'serie-yaxis'}, $index, $xId, $colorSerieId, $paramData->{'param-drawing-object'}->{'serie-value-min'}, $paramData->{'param-drawing-object'}->{'serie-value-max'}); |
775 | if (count($indexes) == 1) | 777 | if (count($indexes) == 1) |
776 | $serieNode->setId($paramData->{'id'}); | 778 | $serieNode->setId($paramData->{'id'}); |
779 | + if (!empty($paramData->{'param-drawing-object'}->{'serie-resolution'})) | ||
780 | + $serieNode->setResolution($paramData->{'param-drawing-object'}->{'serie-resolution'}); | ||
777 | $serieNodes[] = $serieNode; | 781 | $serieNodes[] = $serieNode; |
778 | } | 782 | } |
779 | } | 783 | } |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotYSerieNodeClass.php
@@ -8,6 +8,7 @@ define ("REQUESTOUTPUTPLOTYSERIE_TIMEPLOT_NAME", "serie"); | @@ -8,6 +8,7 @@ define ("REQUESTOUTPUTPLOTYSERIE_TIMEPLOT_NAME", "serie"); | ||
8 | 8 | ||
9 | define ("REQUESTOUTPUTPLOTYSERIE_XID", "xId"); | 9 | define ("REQUESTOUTPUTPLOTYSERIE_XID", "xId"); |
10 | define ("REQUESTOUTPUTPLOTYSERIE_INDEX", "index"); | 10 | define ("REQUESTOUTPUTPLOTYSERIE_INDEX", "index"); |
11 | +define ("REQUESTOUTPUTPLOTYSERIE_RESOLUTION", "resolution"); | ||
11 | define ("REQUESTOUTPUTPLOTYSERIE_RESAMPLING", "resampling"); | 12 | define ("REQUESTOUTPUTPLOTYSERIE_RESAMPLING", "resampling"); |
12 | define ("REQUESTOUTPUTPLOTYSERIE_ERRORBAR", "errorBar"); | 13 | define ("REQUESTOUTPUTPLOTYSERIE_ERRORBAR", "errorBar"); |
13 | 14 | ||
@@ -33,6 +34,16 @@ class RequestOutputPlotYSerieNodeClass extends RequestOutputPlotBaseSerieNodeCla | @@ -33,6 +34,16 @@ class RequestOutputPlotYSerieNodeClass extends RequestOutputPlotBaseSerieNodeCla | ||
33 | return $this->getAttribute(REQUESTOUTPUTPLOTYSERIE_INDEX); | 34 | return $this->getAttribute(REQUESTOUTPUTPLOTYSERIE_INDEX); |
34 | } | 35 | } |
35 | 36 | ||
37 | + public function setResolution($resolution) | ||
38 | + { | ||
39 | + $this->setAttribute(REQUESTOUTPUTPLOTYSERIE_RESOLUTION, $resolution); | ||
40 | + } | ||
41 | + | ||
42 | + public function getResolution() | ||
43 | + { | ||
44 | + return $this->getAttribute(REQUESTOUTPUTPLOTYSERIE_RESOLUTION); | ||
45 | + } | ||
46 | + | ||
36 | public function setXId($xId) | 47 | public function setXId($xId) |
37 | { | 48 | { |
38 | $this->setAttribute(REQUESTOUTPUTPLOTYSERIE_XID, $xId); | 49 | $this->setAttribute(REQUESTOUTPUTPLOTYSERIE_XID, $xId); |