google.load('visualization', '1', {'packages':['barchart']}); google.setOnLoadCallback(init); function init() { var query = new google.visualization.Query('https://www.transifex.com/_/charts/js/gpgtools/GPGKeychain/json/Localizable/'); query.send(handleResponse); //drawToolbar(); } function handleResponse(response) { if (response.isError()) { alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } var data = response.getDataTable(); container = document.getElementById('txchart-GPGKeychain-Localizable'); container.style.textAlign = "center"; chart_div = document.createElement('div'); chart_div.style.width = "100%"; chart_div.style.height = "210px"; link_tx = document.createElement("a"); link_tx.target = "_blank"; link_tx.href = "https://www.transifex.com/"; link_tx.title = "See more information on Transifex.com"; link_tx.innerHTML = ''; link_resource = document.createElement("a"); link_resource.target = "_blank"; link_resource.style.textDecoration = "none"; link_resource.style.color = "black"; link_resource.style.fontSize = "66%"; link_resource.href = "https://www.transifex.com/gpgtools/GPGKeychain/Localizable/"; link_resource.innerHTML = "Top translations: GPG Keychain ยป Localizable"; container.innerHTML = ""; container.appendChild(link_resource); container.appendChild(chart_div); container.appendChild(link_tx); var chart = new google.visualization.BarChart(chart_div); chart.draw(data, { isStacked : true, min : 0, // title : "Project: GPG Keychain >> ", legend : "none", titleColor : '333333', colors : ['#B7E1FF', '#73E6D2', '#F4F6FB'], }); }