Lizmap Web Client 3.11.0

PlotFactory
in package

Create the plot corresponding to the type of the plot configuration.

Table of Contents

Constants

TYPES  : array<string, AbstractPlot>> = array(\LizmapDataviz\Plot\ScatterPlot::TYPE =>...

Methods

create()  : null|AbstractPlot
Create the plot for the given configuration.

Constants

TYPES

public array<string, AbstractPlot>> TYPES = array(\LizmapDataviz\Plot\ScatterPlot::TYPE => \LizmapDataviz\Plot\ScatterPlot::class, \LizmapDataviz\Plot\BoxPlot::TYPE => \LizmapDataviz\Plot\BoxPlot::class, \LizmapDataviz\Plot\BarPlot::TYPE => \LizmapDataviz\Plot\BarPlot::class, \LizmapDataviz\Plot\HistogramPlot::TYPE => \LizmapDataviz\Plot\HistogramPlot::class, \LizmapDataviz\Plot\Histogram2dPlot::TYPE => \LizmapDataviz\Plot\Histogram2dPlot::class, \LizmapDataviz\Plot\PiePlot::TYPE => \LizmapDataviz\Plot\PiePlot::class, \LizmapDataviz\Plot\PolarPlot::TYPE => \LizmapDataviz\Plot\PolarPlot::class, \LizmapDataviz\Plot\SunburstPlot::TYPE => \LizmapDataviz\Plot\SunburstPlot::class, \LizmapDataviz\Plot\HtmlPlot::TYPE => \LizmapDataviz\Plot\HtmlPlot::class)

Methods

create()

Create the plot for the given configuration.

public static create(Project $project, array<string|int, mixed> $plotConfig) : null|AbstractPlot
Parameters
$project : Project

the Lizmap project, the ACL must have been checked

$plotConfig : array<string|int, mixed>

the plot configuration, see Project::parseDatavizPlotConfig()

Return values
null|AbstractPlot —

null if the plot type is not supported

On this page

Search results