Commit 0cea6b06f78d63857c2a99784a3fec58f4feede7
1 parent
9d62f847
Exists in
master
and in
18 other branches
Set preview font style to plt function axis. And expand layout
Showing
1 changed file
with
25 additions
and
0 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
... | ... | @@ -1966,6 +1966,15 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
1966 | 1966 | return $instantPlotInput; |
1967 | 1967 | } |
1968 | 1968 | |
1969 | + /** | |
1970 | + * Set preview font style to given axis | |
1971 | + */ | |
1972 | + private function setPlotPreviewFont($axis){ | |
1973 | + $axis->{"axis-legend-font-activated"} = TRUE; | |
1974 | + $axis->{"axis-legend-font-size"} = 12; | |
1975 | + $axis->{"axis-legend-font-bold"} = TRUE; | |
1976 | + } | |
1977 | + | |
1969 | 1978 | private function unmarshallPlotFunction($input, $plotInput) |
1970 | 1979 | { |
1971 | 1980 | date_default_timezone_set('UTC'); |
... | ... | @@ -1980,6 +1989,14 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
1980 | 1989 | $plotInput->{"interactive-preview"} = true; |
1981 | 1990 | $plotInput->{"file-format"} = "PNG"; |
1982 | 1991 | $plotInput->{"file-output"} = "INTERACTIVE"; |
1992 | + $plotInput->{"page-layout-type"} = "vertical"; | |
1993 | + $plotInput->{"page-layout-object"} = (object)array( | |
1994 | + "layout-expand" => true, | |
1995 | + "layout-panel-height" => 0.5, | |
1996 | + "layout-panel-spacing" => 0.05 | |
1997 | + ); | |
1998 | + | |
1999 | + | |
1983 | 2000 | |
1984 | 2001 | foreach ($plotInput->{'panels'} as $panel) { |
1985 | 2002 | if ($input->{'panelId'} == $panel->{'id'}) { |
... | ... | @@ -1991,6 +2008,9 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
1991 | 2008 | $scale_abscisse = $input->scale_abscisse; |
1992 | 2009 | $scale_ordonnee = $input->scale_ordonnee; |
1993 | 2010 | $panel->{'panel-plot-type'} = RequestOutPutPlotElementPlotFunctionNodeClass::REQUESTOUTPUTPLOTELEMENT_PLOTFUNCTION_NAME; |
2011 | + $panel->{"panel-title-font-activated"} = TRUE; | |
2012 | + $panel->{"panel-title-font-size"} = 12; | |
2013 | + $panel->{"panel-title-font-bold"} = TRUE; | |
1994 | 2014 | |
1995 | 2015 | /** |
1996 | 2016 | * @var object $crtParam |
... | ... | @@ -2096,6 +2116,10 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
2096 | 2116 | } |
2097 | 2117 | } |
2098 | 2118 | |
2119 | + $this->setPlotPreviewFont($plotFctXAxisDigital); | |
2120 | + $this->setPlotPreviewFont($plotFctYAxis); | |
2121 | + $this->setPlotPreviewFont($plotFctXAxisTime); | |
2122 | + | |
2099 | 2123 | /** |
2100 | 2124 | * In this block, I will update the axis scale depending on the user choice hosted in thess variables $scale_abscisse and scale_ordonnee. |
2101 | 2125 | * If 'Inherites' is selected then the scale of axis of the current time plot are used. |
... | ... | @@ -2119,4 +2143,5 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
2119 | 2143 | |
2120 | 2144 | return $plotInput; |
2121 | 2145 | } |
2146 | + | |
2122 | 2147 | } |
... | ... |