Skip to content

Instantly share code, notes, and snippets.

@PaulMougel
Last active August 29, 2015 14:01
Show Gist options
  • Save PaulMougel/edd8046581e6a9d5469e to your computer and use it in GitHub Desktop.
Save PaulMougel/edd8046581e6a9d5469e to your computer and use it in GitHub Desktop.
var charts = ["#drug", "#clinical", "#mri", "#disease", "#gd", "#relapses"].map(function (chart) {
return datachart.compositeChart(chart);
});
charts.push(datachart.barChart("#monthly-chart"));
var svg = element.children('svg');
function compile () { $compile(svg)(scope); };
charts.map(function (chart) { chart.on('postRender', compile); });
var chartDrug = datachart.compositeChart("#drug");
var chartClinical = datachart.compositeChart("#clinical");
var chartMRI = datachart.compositeChart("#mri");
var chartDisease = datachart.compositeChart("#disease");
var moveChart = datachart.barChart("#monthly-chart");
var chartGD = datachart.compositeChart("#gd");
var chartRelapses = datachart.compositeChart("#relapses");
chartDisease.on("postRender",function () {
$compile(element.children('svg'))(scope)
});
chartGD.on("postRender",function () {
$compile(element.children('svg'))(scope)
});
chartMRI.on("postRender",function () {
$compile(element.children('svg'))(scope)
});
chartClinica62l.on("postRender",function () {
$compile(element.children('svg'))(scope)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment