score:1

Instead of passing an Array of final_data, you are passing as a String, So that its not working!

 var fetched_data = [];

function getData() {
    $.ajax({
        type: "GET",
        url: "http://localhost:5000/renderheatmap",
        dataType: 'json'
    }).done(function(jsonData) {
        for (var i = 0; i < jsonData.length; i++) {
            fetched_data.push(jsonData[i])
        }
      //  document.getElementById('test_div').innerHTML = fetched_data;

      //  final_data = new Array(fetched_data);

        Highcharts.chart('yourid', {

            series: [{
                name: 'Sales per employee',
                borderWidth: 1,

                data: fetched_data,

                dataLabels: {
                    enabled: true,
                    color: '#000000'
                }
            }]

        });


    });

} 

Hope this code Helps!!


Related Query

More Query from same tag