protected function getGraphScript() {
        $id = $this->htmlOptions['id'];
        $options = Json::encode($this->options);
        $data = $this->processDates();
        return "
            var $this->jsVarName = new Dygraph(
                document.getElementById('$id'),
                $data,
                $options
            );
        ";
    }