DEV Community

Ahmed kabeer Shaukat
Ahmed kabeer Shaukat

Posted on

how to convert this chart into a react class or function component and rnder it to the main div

this is a sample chart ....
i dont know how to convert it into class compnent and
render it to the root element

// Create hover state and set alternative fill color
let hs = polygonTemplate.states.create("hover");
hs.properties.fill = chart.colors.getIndex(0).brighten(-0.5);

let animation;
setTimeout(function(){
animation = chart.animate({property:"deltaLongitude", to:100000}, 20000000);
}, 3000)

chart.seriesContainer.events.on("down", function(){
if(animation){
animation.stop();
}
})

amCharts
More info
Accessibility Features
About amCharts
Press Kit
amCharts Blog
Getting support
The Docs
The Docs: Changelog
Subscribe to amNews
Products
amCharts 4: Charts
amCharts 4: Maps
amCharts 4: TimeLine
WordPress Plugin
Legacy products
Version information
Tools & Resources
Free SVG Maps
Online Chart Editor
Pixel Map Generator
Visited Countries Map
Visited States Map
Contact Us
contact@amcharts.com
Support Center
Legal Stuff
Privacy Policy
Terms & Conditions
Facebook
Twitter
LinkedIn
Copyright © 2006-2020, amCharts. All rights reserved.
We use cookies on our website to support technical featur

Top comments (0)