I have registered my graph function and added my graph template to my module.
In the graph function I add the flot pie chart js to the javascript_href_footer (the pie plugin script is already in the flot contrib directory).
If I hard code my data into my graph template it works ok, but I'm stuck with passing graph data into the template either via the jrGraph_embed function or via my custom graph function.
What I'd like to be able to do is pass in $override_data in some way, maybe in the smarty function eg:
{$override_data='[{ label: "Series1", data: 10},{ label: "Series2", data: 30},{ label: "Series3", data: 90},{ label: "Series4", data: 70},{ label: "Series5", data: 80},{ label: "Series6", data: 110}]' }
{jrGraph_embed module="ujPlanner" name="graph_pie_chart" override_data=$override_data}
Or in the registered function, eg:
$_rs['override_data'] = array("Series1" => 10,"Series2" => 5,"Series3" => 11,"Series4" => 7);
For now though I think I'm going to have to parse a non-jrGraph graph template within my module so that I can get my item data to appear as a pie.
--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)