I need to Incorporate certain Google Chart in a single page. How do i control the spacing? -
below javascript google chart. have added below in html write code html using table have incorporated every single id. sapaces becomes top bottom , left right between each chart. how can control though have not given css property table.
google.load("visualization", "1", {packages:["corechart"]}); google.setonloadcallback(drawchart); function drawchart() { var data1 = google.visualization.arraytodatatable([ ['task', 'question1'], ['i don’t know', 11], ['no', 49], ['yes', 40] ]); var options1 = { title: 'question1', piehole: 0.4, chartarea:{left:8}, 'width': 400, 'height': 400, colors: [ '#9bbb59', '#c0504d', '#4f81bd'] }; var data2 = google.visualization.arraytodatatable([ ['task', 'question2], ['significant', 32], ['moderate', 60], ['minor', 8] ]); var options2 = { title: 'question2' piehole: 0.4, chartarea:{left:8}, 'width': 400, 'height': 400, colors: ['#c0504d', '#9bbb59', '#4f81bd'] }; var data3 = google.visualization.arraytodatatable([ ['task', 'question3'], ['i don’t know', 24], ['from platform', 11], ['within current team', 65] ]); var options3 = { title: 'question3', piehole: 0.4, chartarea:{left:8}, 'width': 400, 'height': 400, colors: [ '#9bbb59', '#c0504d', '#4f81bd'] }; var data4 = google.visualization.arraytodatatable([ ['task', 'question4'], ['i don’t know', 16], ['no', 19], ['yes', 65] ]); var options4 = { title: '4. question4', piehole: 0.4, chartarea:{left:8}, 'width': 400, 'height': 400, colors: [ '#9bbb59', '#c0504d', '#4f81bd'] }; var data5 = google.visualization.arraytodatatable([ ['task', 'question5'], ['a clear, formalized , distributed carried interest program', 38], ['the availability of equity in gp', 24], ['annual cash compensation keeps market', 22], ['other (please specify)', 16] ]); var options5 = { title: 'question5', position: 'left', legend : { position:"right"}, piehole: 0.4, chartarea:{left:0, width:"100%",height:"45%"}, colors: ['#4f81bd', '#c0504d', '#9bbb59', '#8064a2'] }; var chart1 = new google.visualization.piechart(document.getelementbyid('donutchart1')); chart1.draw(data1, options1); var chart2 = new google.visualization.piechart(document.getelementbyid('donutchart2')); chart2.draw(data2, options2); var chart3 = new google.visualization.piechart(document.getelementbyid('donutchart3')); chart3.draw(data3, options3); var chart4 = new google.visualization.piechart(document.getelementbyid('donutchart4')); chart4.draw(data4, options4); var chart5 = new google.visualization.piechart(document.getelementbyid('donutchart5')); chart5.draw(data5, options5); }
Comments
Post a Comment