github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/dashboard/app/templates/graph_histogram.html (about)

     1  {{/*
     2  Copyright 2024 syzkaller project authors. All rights reserved.
     3  Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     4  
     5  Number of found bugs per month.
     6  */}}
     7  
     8  <!doctype html>
     9  <html>
    10  <head>
    11  	<title>{{.Title}}</title>
    12  	{{template "head" .Header}}
    13  
    14  	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
    15  	<script type="text/javascript">
    16  		google.load("visualization", "1", {packages:["corechart"]});
    17  		google.setOnLoadCallback(function() {
    18  			var data = new google.visualization.DataTable();
    19  			data.addColumn({type: 'string'});
    20  			{{range $.Graph.Headers}}
    21  				data.addColumn({type: 'number', label: "{{.Name}}"});
    22  			{{end}}
    23  			data.addColumn({type: 'number', role: 'annotation'});
    24  			data.addRows([
    25  					{{range $.Graph.Columns}}
    26  						["{{.Hint}}", {{range .Vals}}{{.Val}},{{end}} {{.Annotation}}],
    27  					{{end}}
    28  			]);
    29  			new google.visualization.ColumnChart (
    30  				document.getElementById('graph_div')).
    31  				draw(data, {
    32  					width: "100%",
    33  					chartArea: {width: '90%', height: '85%'},
    34  					legend: {position: 'in'},
    35  					focusTarget: "category",
    36  					isStacked: true,
    37  					vAxis: {minValue: 1, textPosition: 'out', gridlines: {multiple: 1}, minorGridlines: {multiple: 1}},
    38  					hAxis: {minValue: 1, textPosition: 'out', maxAlternation: 1, gridlines: {multiple: 1}, minorGridlines: {multiple: 1}},
    39  					series: {
    40  						{{range $idx, $hdr := $.Graph.Headers}}
    41  							{{$idx}}: {color: "{{$hdr.Color}}"},
    42  						{{end}}
    43  					},
    44  					annotations: { textStyle: { color: 'black', bold: true }},
    45  				})
    46  		});
    47  	</script>
    48  </head>
    49  <body>
    50  	{{template "header" .Header}}
    51  	<div id="graph_div"></div>
    52  </body>
    53  </html>