0 down vote favorite
i use yii and this widget for making a chart
yiiwheels.widgets.highcharts.WhHighCharts
but it turns out that it couldn’t be sized as i want. it just fit as wide as my screen. i want to make it a bit smaller. But how? i’ve tried adding 'htmlOption=>array(‘height’=>…, ‘width’=>…) but it makes no change.
here’s my code
<?php
$label=array();
$nilai=array();
foreach($grafikskor->getData() as $i=>$ii)
{
$label[$i]=$ii['idsimulasi'];
$nilai[$i]=(int)$ii['nilai'];
}
$this->widget(
'yiiwheels.widgets.highcharts.WhHighCharts',
array(
'pluginOptions' => array(
'title' => array('text' => 'Grafik Simulasi Siswa'),
'xAxis' => array(
'categories' => $label
),
'yAxis' => array(
'title' => array('text' => 'Skor Simulasi')
),
'series' => array(
array('data'=>$nilai)
)
),
'htmlOptions' => array(
'width'=> '250',
'heght' => '100'
)
)
);;
?>
anyone know this?