From f71141502b0ec75d450e3f68bfac2ffe8553ddc2 Mon Sep 17 00:00:00 2001 From: jbogartPint Date: Mon, 6 Jun 2016 17:10:08 -0700 Subject: [PATCH] Feature - fullscreen render functionality --- zc.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zc.php b/zc.php index 8955b2f..9be3c9c 100644 --- a/zc.php +++ b/zc.php @@ -7,6 +7,7 @@ class ZC { private $theme; private $width; private $height; + private $fullscreen = false; private $config; private $data; @@ -38,6 +39,7 @@ public function render() { $width = $this->width; $height = $this->height; $theme = $this->theme; + $fullscreen = $this->fullscreen; $jsonConfig = json_encode($this->config); $gold = <<< EOT @@ -48,6 +50,7 @@ public function render() { theme: "$theme", width: "$width", height: "$height", + fullscreen: $fullscreen, data: $jsonConfig } ); @@ -219,6 +222,10 @@ public function setChartHeight($height) { public function setChartTheme($theme) { $this->theme = $theme; } + public function setFullscreen() { + $this->fullscreen = !$this->fullscreen; + } + public function enableScaleXZooming() { $this->config['scale-x']['zooming'] = 'true';