php - How to pass a smarty associative array to an amChart -
i'm new smarty. want display amchart. have included tpl file in tpl file. want pass smarty associative array amchart. how do it, because chart not beingness loaded. wish pass smarty array chart.dataprovider attribute.
var chart = new amcharts.ampiechart(); chart.valuefield = "value"; chart.titlefield = "title"; chart.dataprovider = {$chart_data}; chart.write("chart_div");
you'll have recreate javascript looping array smarty or, much better, json_ncode array php , output result javascript use
php charts smarty
No comments:
Post a Comment