| <html> |
| <head> |
| <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> |
| <script type="text/javascript"> |
| google.charts.load('current', {'packages':['bar']}); |
| google.charts.setOnLoadCallback(drawChart); |
| |
| function drawChart() { |
| var data = google.visualization.arrayToDataTable([ |
| ['Type', '#'], |
| ['Classes', [%=EClass.all.size()%]], |
| ['Attributes', [%=EAttribute.all.size()%]], |
| ['References', [%=EReference.all.size()%]] |
| ]); |
| |
| var options = { |
| chart: { |
| title: 'Stats', |
| subtitle: '# of elements per type', |
| }, |
| bars: 'horizontal' // Required for Material Bar Charts. |
| }; |
| |
| var chart = new google.charts.Bar(document.getElementById('barchart_material')); |
| |
| chart.draw(data, google.charts.Bar.convertOptions(options)); |
| } |
| </script> |
| </head> |
| <body> |
| <div id="barchart_material" style="width: 900px; height: 300px;"></div> |
| </body> |
| </html> |