Paul's Programming Notes     Archive     Feed     Github

Yii Google Chart Extension

Here's YiiWheel's google chart wrapper extension:

I downloaded just the WhVisualizationChart file and put this in my view:

$this->widget('ext.WhVisualizationChart', array(
    'visualization' => 'PieChart',
    'data' => $chartDataProvider,
    'options' => array(
        'pieHole'=> '0.5',
    'htmlOptions'=>array('style'=>'width:100%; height:375px'),

and this in my controller:

public function actionIndex()
        $chartDataProvider = array(
            array('Task', 'Hours per Day'),
            array('Work', 11),
            array('Eat', 2),
            array('Commute', 2),
            array('Watch TV', 2),
            array('Sleep', 7)
$this->render('index', array('chartDataProvider'=>$chartDataProvider));

Examples on how to use it are at the bottom of this page:

Enabling SSL On Apache

This is a quick overview of the process of adding an SSL certificate to apache (for next time...):
  1. Generate your private key and CSR with:
    openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr
  2. Request your certificate
  3. Save requested certificate onto server in a .crt file
  4. Download the intermediary/root cert from
  5. Make your site file in /etc/apache2/sites-enabled/ look like this:
<VirtualHost *:443>

        SSLEngine On
         SSLCertificateFile /home/youruser/yourdomain.crt
         SSLCertificateKeyFile /home/youruser/yourdomain.key
         SSLCACertificateFile /var/www/verisign.crt


        DocumentRoot /var/www/yourdomain

An explanation of each of those certificates:
SSLCertificateFile - This is the certificate you received after your request.
SSLCertificateKeyFile - This is the private key you generated in step 1.
SSLCACertificateFile - This is the intermediary cert you downloaded from verisign.