Grouped and sorted columns

by alcosbarco

HTML

<script src="https://www.amcharts.com/lib/4/core.js"></script>
<script src="https://www.amcharts.com/lib/4/charts.js"></script>
<script src="https://www.amcharts.com/lib/4/themes/animated.js"></script>
<div id="chartdiv"></div>

CSS

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

#chartdiv {
  width: 100%;
  height: 500px;
}

JavaScript

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>amCharts 4</title>
  
  <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/maps.js"></script>

  <script>
    am4core.ready(function() {
        let chart = am4core.createFromConfig({
                "type": "XYChart",
                "data": [{
                    "Mes": "ENE 2019",
                    "Cobertura": 44,
                    "Exportacion": 6816,
                    "importacion": -4816
                }, {
                    "Mes": "FEB 2019",
                    "Cobertura": 92,
                    "Exportacion": 6254,
                    "importacion": 4816
                }, {
                    "Mes": "MAR 2019",
                    "Cobertura": 23,
                    "Exportacion": 5897,
                    "importacion": -200
                }, {
                    "Mes": "ABR 2019",
                    "Cobertura": 21,
                    "Exportacion": 7011,
                    "importacion": 4816
                }, {
                    "Mes": "MAY 2019",
                    "Cobertura": 26,
                    "Exportacion": 7804,
                    "importacion": -360
                }, {
                    "Mes": "ENE 2020",
                    "Cobertura": 33,
                    "Exportacion": 7828,
                    "importacion": 4816
                }, {
                    "Mes": "FEB 2020",
                    "Cobertura": 89,
                    "Exportacion": 9080,
                    "importacion": 4816
                }, {
                    "Mes": "MAR 2020",
                    "Cobertura": 24,
                    "Exportacion": 7632,
                    "importacion": 4816
                }],
               ...