for version 2, you just need to generate a javascript json like this one
<script type='text/javascript'>
var data = {"title":{"text":""},"is_decimal_separator_comma":0,"elements":[{"values":[{"value":25000,"label":"AIG Australia 41.67%","highlight":"alpha"},{"value":35000,"label":"Valentino Jr. 58.33%","highlight":"alpha"}],"alpha":0.8,"type":"pie","start-angle":21,"tip":"#val# - #percent#","colours":["#F09B0A","#F03060","#E6FF29","#805B37","#13613A","#aacc44"]}],"num_decimals":2,"is_fixed_num_decimals_forced":0,"is_thousand_separator_disabled":0};
$(document).ready(function(){
swfobject.embedSWF("/flash/open-flash-chart.swf", "echart", "600","400","9.0.0");
});
function open_flash_chart_data()
{
ex = JSON.stringify(data);
return ex;
}
</script>
I am using Grails for that , but i think it is same with codeigniter :)