web_defender/Device/static/malware/js/MalwareBubbleChart.js
2024-12-09 13:43:16 +05:30

42 lines
1.5 KiB
JavaScript

google.charts.load('current', { 'packages': ['corechart'] });
google.charts.setOnLoadCallback(drawSeriesChart);
function drawSeriesChart() {
var data = google.visualization.arrayToDataTable([
['ID', 'Life Expectancy', 'Fertility Rate', 'Region', 'Population'],
['', 80.66, 1.67, '1', 33739900],
['', 79.84, 1.36, '2', 81902307],
['', 78.6, 1.84, '3', 5523095],
['', 72.73, 2.78, '4', 79716203],
['', 80.05, 2, '5', 61801570],
['', 72.49, 1.7, '6', 73137148],
['', 68.09, 4.77, '7', 31090763],
['', 81.55, 2.96, '8', 7485600],
['', 68.6, 1.54, '9', 141850000],
['', 78.09, 2.05, '1', 307007000],
['', 82.66, 1.67, '2', 33739900],
['', 76.84, 1.36, '3', 81902307],
['', 77.6, 1.84, '4', 5523095],
['', 70.73, 2.78, '5', 79716203],
['', 85.05, 2, '6', 61801570],
['', 75.49, 1.7, '7', 73137148],
['', 69.09, 4.77, '8', 31090763],
['', 82.55, 2.96, '9', 7485600],
['', 64.6, 1.54, '1', 141850000],
['', 79.09, 2.05, '2', 307007000],
]);
var options = {
title: '',
height: 400,
width: 800,
bubble: { textStyle: { fontSize: 11 } },
backgroundColor: '#000000',
tooltip: { trigger: 'none' },
};
console.log("chart")
var chart = new google.visualization.BubbleChart(document.getElementById('MalwareBubbleChart'));
chart.draw(data, options);
}