You must be logged in to post your query.
Home › Forums › Chart Support › Animation is not working for graph
Tagged: animation
Link : http://demo-wordpress.hackerearth.com/rec-new/recruiter-survey-2021/#chapter1
Code: var stud_developer_domains = new CanvasJS.Chart(“stud_developer_domains”, { title:{ text: “My First Chart in CanvasJS” }, data: [ { // Change type to “doughnut”, “line”, “splineArea”, etc. type: “column”, dataPoints: [ { label: “apple”, y: 10 }, { label: “orange”, y: 15 }, { label: “banana”, y: 25 }, { label: “mango”, y: 30 }, { label: “grape”, y: 28 } ] } ] });
var elementid = document.getElementById(“stud_developer_domains”); var offsetForChartToDisplay = elementid.offsetTop + 150; function scrollFunction() { if( (document.documentElement.scrollTop+window.innerHeight) > offsetForChartToDisplay) { window.removeEventListener(“scroll”, scrollFunction); stud_developer_domains.render(); } } window.addEventListener(“scroll”, scrollFunction)
Animation on scroll down is not working. Please help me.
@usha,
Based on the code shared by you, it seems like you have not set the animationEnabled property. Setting animationEnabled: true should work fine in your case
animationEnabled: true
— Ranjitha R Team CanvasJS
You must be logged in to reply to this topic. Login/Register