AM Charts - Themes

am-charts

How can we use a theme?

amCharts 4 makes it easy to apply themes to am4charts. Let's make our chart more lively by enabling "Animated" theme. To do so, we'll need to remember to import the theme itself as well as set the system to use it.

<script src="//www.amcharts.com/lib/4/core.js"></script>
<script src="//www.amcharts.com/lib/4/charts.js"></script>
<script src="//www.amcharts.com/lib/4/themes/animated.js"></script>

<div id="chartdiv" style="width: 100%; height: 400px;"></div>

<script>
// Set theme
am4core.useTheme(am4themes_animated);

// Create chart instance
var chart = am4core.create("chartdiv", am4charts.PieChart);

// ...
</script>
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License