scottharwell / GoogleCharts

CakePHP Plugin for Google Charts Javascript API
26 stars 30 forks source link

Add support for data table roles #10

Closed PhantomWatson closed 11 years ago

PhantomWatson commented 11 years ago

Currently, the Google Charts plugin doesn't recognize roles (like 'annotation') for specified columns. This will allow the use of roles like in the following example:

$chart->columns(array(
    'category' => array(
        'type' => 'string',
        'label' => 'Category'
    ),
    'score' => array(
        'type' => 'number',
        'label' => 'Score'
    ),
    'annotation' => array(
        'type' => 'string', 
        'role' => 'annotation',
        'label' => 'Annotation'
    )
);
$chart->addRow(array(
    'category' => 'BAC After Birthday Party',
    'score' => .240,
    'annotation' => 'Hammered'
));