26/06
2016
c2.js adapter for the Yii Framework
Easily add C3.js graphs to your Yii application., (*2)
protected/extensions/
To use this widget, you may insert the following code into a view file:, (*3)
$this->Widget('ext.c3js.C3JsWidget', array( 'options' => array( 'title' => array( 'text' => "My Chart" ), 'data' => array( 'columns' => array( array('data1', 30, 200, 100, 400, 150, 250) ), ) ) )); ?>
By configuring the options
property, you may specify the options that need to be passed to the C3.js JavaScript object.
Please refer to the demo gallery and documentation on the C3.js website for possible options., (*4)
Alternatively, you can use a valid JSON string in place of an associative array to specify options ```, (*5)
Note: You must provide a valid JSON string (double quotes) when using the second option. You can quickly validate your JSON string online using JSONLint., (*6)