//jQuery(() => { google.charts.load('current', {packages: ['corechart', 'bar']}); google.charts.setOnLoadCallback(drawMultSeries); // alert(); //}); function drawMultSeries() { let data = google.visualization.arrayToDataTable([ ['モデル', '実行時間'], ['AMD® GPU Radeon\nHD 5870', {v: 0.0000072220, f: 0.0000072220}], ['Intel® GPU HD Graphics 4000', {v: 0.0007947200, f: 0.0007947200}], ['NVIDIA® Tesla® T4\n(Google Colab)', {v: 0.0010557440, f: 0.0010557440}], ['AMD® CPU Phenom™ II X6 1100T Processor', {v: 0.0010633330, f: 0.0010633330}], ['Intel® CPU Core™ i7-3517U CPU @ 1.90GHz', {v: 0.0011095000, f: 0.0011095000}], ['NVIDIA® GPU GeForce GT 640M', {v: 0.0015742400, f: 0.0015742400}], ]); let options = { title: 'OpenCL ベンチマーク - benchmark-all.py 実行時間(秒)', chartArea: { width: '50%', }, width: 620, height: 350, is3D: true, hAxis: { title: '<- fast | slow ->', minValue: 0, scaleType: 'log' }, vAxis: { title: 'モデル' }, explorer: { actions: ['dragToZoom', 'rightClickToReset'], axis: 'horizontal', keepInBounds: true, maxZoomIn: 4.0, }, }; let chart = new google.visualization.BarChart(document.getElementById('chart_div')); chart.draw(data, options); }
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <div id="chart_div" style="width: 630px; height: 350px; overflow-x: scroll;"></div>