akefa,
jQuery(document).ready(function() {
jQuery('.chart').viewportChecker({
classToAdd: 'animated fadeIn',
offset: 100,
callbackFunction: function(elem, action) {
var chart = new CanvasJS.Chart("chartContainerPie2", {
animationEnabled: true,
legend: {
verticalAlign: "bottom",
horizontalAlign: "center"
},
data: [{
type: "pie",
toolTipContent: "{legendText}: <strong>{y}%</strong>",
indexLabel: "{label} {y}%",
dataPoints: [{
y: 35,
legendText
}, {
y: 20,
legendText
}, {
y: 18,
legendText
}, {
y: 15,
legendText
}, {
y: 5,
legendText
}, {
y: 7,
legendText
}]
}]
});
chart.render();
}
})
});