          ws.onmessage = function (evt) {
                var msg = evt.data;
                var last_message = document.getElementById("last_message");
                // last_message.innerHTML = "Last message: " + msg;

                var record = JSON.parse(msg);
                salesPriceData.set(record["category"], record["accumulated-sales"]);

                barChartData.labels = Array.from( salesPriceData.keys() );
                barChartData.datasets[0].data = Array.from( salesPriceData.values(