Hi Jakub, The problem is with your divs. If you want to see your Total graph at the bottom, move it two lines up so that it's in the same container as chart_div5.
Jon On Tue, Jun 10, 2014 at 6:27 AM, Jakub Michalewski < [email protected]> wrote: > Hi, > I hope someone can help me, > > I have a php code that generates a html code that should draw me 6 graphs > but the last one is not visible (not drawed). > > What can cause this problem. > > Code Below: > > > > > <html> <head> <link rel="stylesheet" type="text/css" href="css/layout.css > <http://mobileapps.gs-fresh.com/solarpanels/css/layout.css>" /> <script > type="text/javascript" src="https://www.google.com/jsapi"></script> <script > type="text/javascript"> google.load("visualization", "1", > {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function > drawChart() { var data = google.visualization.arrayToDataTable([ ['Day', > 'Power Generated'] ,['2014-06-01', 2764200],['2014-06-02', > 1267600],['2014-06-03', 1668900],['2014-06-04', 1213500],['2014-06-05', > 2346300],['2014-06-06', 1575500],['2014-06-07', 1743600],['2014-06-08', > 2782600],['2014-06-09', 2194700],['2014-06-10', 0] ]); var data_current > = google.visualization.arrayToDataTable([ ['Day', 'Power Generated'] > ,['2014-06-01', > 2764200],['2014-06-02', 1267600],['2014-06-03', 1668900],['2014-06-04', > 1213500],['2014-06-05', 2346300],['2014-06-06', 1575500],['2014-06-07', > 1743600],['2014-06-08', 2782600],['2014-06-09', 2194700],['2014-06-10', 0] > ]); var data2 = google.visualization.arrayToDataTable([ ['Day', 'Power > Generated'] ,['2014-06-01', 265300],['2014-06-02', 119600],['2014-06-03', > 162600],['2014-06-04', 113200],['2014-06-05', 231300],['2014-06-06', > 139000],['2014-06-07', 173800],['2014-06-08', 259100],['2014-06-09', > 209000],['2014-06-10', 0] ]); var data3 = > google.visualization.arrayToDataTable([ ['Day', 'Power Generated'] > ,['2014-06-01', > 371700],['2014-06-02', 172800],['2014-06-03', 234900],['2014-06-04', > 163100],['2014-06-06', 192900],['2014-06-07', 248900],['2014-06-08', > 357800],['2014-06-09', 297000],['2014-06-10', 0] ]); var data4 = > google.visualization.arrayToDataTable([ ['Day', 'Power Generated'] > ,['2014-06-01', > 566800],['2014-06-02', 366400],['2014-06-03', 310700],['2014-06-04', > 164300],['2014-06-05', 497300],['2014-06-06', 264400],['2014-06-07', > 335900],['2014-06-08', 497700],['2014-06-09', 434800],['2014-06-10', 0] ]); > var data6 = google.visualization.arrayToDataTable([ ['Day', 'Power > Generated'] ,['2014-06-01', 3968000],['2014-06-02', > 1926400],['2014-06-03', 2377100],['2014-06-04', 1654100],['2014-06-05', > 3074900],['2014-06-06', 2171800],['2014-06-07', 2502200],['2014-06-08', > 3897200],['2014-06-09', 3135500],['2014-06-10', 0] ]); > > > var options = { title: 'Barway Roof', curveType: 'function', legend: { > position: 'bottom' }, backgroundColor: { fill: 'transparent' } }; var > options2 = { title: 'Social Centre', curveType: 'function', legend: { > position: 'bottom' }, backgroundColor: { fill: 'transparent' }, colors: > ['#e0440e', '#e6693e', '#ec8f6e', '#f3b49f', '#f6c7b6'] }; var options3 = > { title: 'Barway Hostel', curveType: 'function', legend: { position: > 'bottom' }, backgroundColor: { fill: 'transparent' }, colors: ['#00ff00', > '#e6693e', '#ec8f6e', '#f3b49f', '#f6c7b6'] }; var options4 = { title: > 'Manor Farm', curveType: 'function', legend: { position: 'bottom' }, > backgroundColor: { fill: 'transparent' }, colors: ['#ffff00', '#e6693e', > '#ec8f6e', '#f3b49f', '#f6c7b6'] }; var options_current = { title: > 'Barway Roof', curveType: 'function', legend: { position: 'top' }, > backgroundColor: { fill: 'transparent' }, colors: ['#00ff00', '#e6693e', > '#ec8f6e', '#f3b49f', '#f6c7b6'] }; var options6 = { title: 'Total', > curveType: 'function', legend: { position: 'top' }, backgroundColor: { > fill: 'transparent' }, colors: ['#00fff0', '#e6693e', '#ec8f6e', > '#f3b49f', '#f6c7b6'] }; > > > var chart = new > google.visualization.LineChart(document.getElementById('chart_div')); > chart.draw(data, options); var chart2 = new > google.visualization.LineChart(document.getElementById('chart_div2')); > chart2.draw(data2, options2); var chart3 = new > google.visualization.LineChart(document.getElementById('chart_div3')); > chart3.draw(data3, options3); var chart4 = new > google.visualization.LineChart(document.getElementById('chart_div4')); > chart4.draw(data4, > options4); var chart5 = new > google.visualization.LineChart(document.getElementById('chart_div5')); > chart5.draw(data_current, > options_current); var chart6 = new > google.visualization.LineChart(document.getElementById('chart_div6')); > chart6.draw(data6, > options6); > > } </script> </head> <body><center><h1>Current Month Data for G's Holding > Group Solar Panels</h1> <p><a href="all_data.php > <http://mobileapps.gs-fresh.com/solarpanels/all_data.php>"><button class=" > myButton">All Data</button></a></p> <div style="position: relative; > margin: auto; height: 100%"> <div style="float: left; width: 20%; > margin-left: 20px;"> <div id="mini_graph"><div id="chart_div"></div></div> > <div > id="mini_graph"><div id="chart_div2"></div></div> <div id="mini_graph"><div > id="chart_div3"></div></div> <div id="mini_graph"><div id="chart_div4"> > </div></div> > <div id="mini_graph"><div id="chart_div5"></div></div> > > </div> <div id="prawe_menu"><div id="chart_div6"></div> </div> </div> > </body></html> > > -- > You received this message because you are subscribed to the Google Groups > "Google Chart API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/google-chart-api. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Google Chart API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-chart-api. For more options, visit https://groups.google.com/d/optout.
