Current Path : /home/bitrix/ext_www/rgc.yacl.site/frontender/js/ |
Current File : /home/bitrix/ext_www/rgc.yacl.site/frontender/js/chart.js |
$(document).ready(function(){ google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawVisualization); function drawVisualization() { // Some raw data (not necessarily accurate) var data = google.visualization.arrayToDataTable([ ['Month', 'п.м.', 'п.м.', 'п.м.', 'п.м.'], ['01.06', 0.2,0.2,300,300], ['02.06', 0.4,0.45,200,250], ['03.06', 0.5,0.55,80,80], ['04.06', 0.6,0.7,160,100], ['05.06', 1,1.2,250,250], ['06.06', 1.5,1.7,60,100], ['07.06', 1.8,1.9,100,150], ['08.06', 1.8,1.9,100,150], ['09.06', 1.8,1.9,100,150], ['10.06', 1.8,1.9,100,150], ['11.06', 1.8,1.9,100,150], ['12.06', 1.8,1.9,100,150], ['13.06', 1.8,1.9,100,150], ['14.06', 1.8,1.9,100,150], ['15.06', 1.8,1.9,100,150], ['16.06', 1.8,1.9,100,150], ['17.06', 1.8,1.9,100,150], ['18.06', 1.8,1.9,100,150], ['19.06', 1.8,1.9,100,150], ['20.06', 1.8,1.9,100,150], ]); var options = { seriesType: 'bars', colors: ['#1f3096', '#6072de'], series: { 0: {type: 'line', color: '#0338fd', targetAxisIndex:1}, 1: {type: 'line', color: 'white', targetAxisIndex:1}, }, vAxes: { 1: { title:'п.м.', textStyle: {color: 'white', left: 5} } }, width: $('#chart_div').width(), height: $('#chart_div').height(), fontName: 'Solomon Sans', fontSize: 16, backgroundColor: 'transparent', chartArea:{ left:50, top:20, width: $('#chart_div').width() - 105, height:$('#chart_div').height() - 37 }, legend: { position: 'none' }, vAxis: { textStyle: { color: 'white', fontSize: 18 }, gridlines : { color: 'transparent', }, baselineColor: 'white', }, hAxis: { textStyle: { color: 'white', fontSize: 14 }, gridlines : { color: 'transparent', }, }, }; chart = new google.visualization.ComboChart(document.getElementById('chart_div')); chart.draw(data, options); } })