classes_lib_controls_datamap.class
Datamap wrapper for https://github.com/markmarkoh/datamaps
Extends: Control » Renderable
Get/Set configuration.
Definition: public function conf($name, $value=null)
Returns: mixed
If value is given, return $this, else returns the data for 'key'
Parameters:
-
string $name
config key -
mixed $value
Optional value
OVERRIDE Control::PreRender
Sets the color for a country.
Definition: public function setColor($country_code, $color, $tooltip=false)
Returns: static
Parameters:
-
string $country_code
Country code (US, DE,...) -
string $color
HTML color -
string $tooltip
Optional tooltip
Sets a color range for the datamap.
Definition: public function setColorRange($range)
Returns: static
Parameters:
-
\ScavixWDF\Base\Color\ColorRange $range
The ColorRange
Sets the value for a country. Note: This can only be used if a color range has been set with Datamap::setColorRange
Definition: public function setValue($country_code, $value, $tooltip=false)
Returns: static
Parameters:
-
string $country_code
Country Code -
float|int $value
The value, see ColorRange::fromValue -
string $tooltip
Optional tooltip