* @copyright Copyright © Clevertech 2012- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @package YiiBooster bootstrap.widgets */ class TbGoogleVisualizationChart extends CWidget { /** * @var string $containerId the container Id to render the visualization to */ public $containerId; /** * @var string $visualization the type of visualization -ie PieChart * @see https://google-developers.appspot.com/chart/interactive/docs/gallery */ public $visualization; /** * @var array $data the data to configure visualization * @see https://google-developers.appspot.com/chart/interactive/docs/datatables_dataviews#arraytodatatable */ public $data = array(); /** * @var array $options additional configuration options * @see https://google-developers.appspot.com/chart/interactive/docs/customizing_charts */ public $options = array(); /** * @var array $htmlOption the HTML tag attributes configuration */ public $htmlOptions = array(); /** * Widget's run method */ public function run() { $id = $this->getId(); $this->htmlOptions['id'] = $id; // if no container is set, it will create one if($this->containerId==null) { $this->containerId = 'div-chart'.$id; echo '