javascript - Highcharts heat map not displaying properly -
i'm trying create heat map using highcharts it's not loading (just lines instead of heat map itself).
i'm loading data json
file:
chart: { type: 'heatmap', margintop: 40, marginbottom: 80, plotborderwidth: 1 }, xaxis: { categories: $scope.loaddays() }, yaxis: { categories: $scope.loadhours(), title: null, reversed: true }, series: [{ name: null, borderwidth: 1, data: [], datalabels: { enabled: true, color: '#000000' } }] $scope.getheatmapdata = function(data) { var response = []; $scope.data = data; if(data && $scope.data.timestamps && $scope.data.info) { $scope.data.timestamps.foreach(function(element, index) { if ($scope.data.info[index]) { response.push([ moment(element).day(), moment(element).hour(), $scope.data.info[index] ]); } }); } return response; };
the data being logged correctly console but, reason, heat map isn't loading.
i've created plunker can see behavior.
any ideas?
i making mistake when reloading chart. had add type event:
chartconfig.chart = { type: 'heatmap', events: { load: callback } };
Comments
Post a Comment