Yii Framework Forum: Yiiwheels Whhighchart size - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yiiwheels Whhighchart size making height and width for the chart Rate Topic: -----

#1 User is offline   nadyariestya 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 25-September 14

Posted 18 February 2015 - 06:37 PM

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?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users