I am using high chart in my yii based application.
after querying the database I am storing the result in a associative array named $catexp
after printing the structure using print_r($catexp) I am getting follwing
Array ( [0] => Array ( [name] => Food [y] => 91 ) [1] => Array ( [name] => Utilities [y] => 9 ) )
now this the structure of data which can be passed to highcart for generating pie chart.
but after passing this $catexp as data for pie chart I am getting wired output i.e. i am not getting the full chart
see the attachment for image…
2147
although i made a similar manual array structure like this
$a = array('name'=> 'Opera','y'=>91);
$b = array('name'=> 'Safari','y'=>9);
$c = array($a,$<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/cool.gif' class='bbc_emoticon' alt='B)' />;
print_r($c) gives
Array ( [0] => Array ( [name] => Opera [y] => 91 ) [1] => Array ( [name] => Safari [y] => 9 ) )
and passed this variable as data for pie chart and i got the full chart.
see the attacment…
2148
So my question is what is wrong with my previous chart both the array structures are same but output is diff??