Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I put in my Database in a Google Line chart?
    primarykey
    data
    text
    <p>I have this database with this table that I want to put in on my .jsp page that I coded in basic HTML. The project is in Spring mvc.</p> <pre><code>CREATE TABLE `status` ( `idStatus` int(11) NOT NULL AUTO_INCREMENT, `timeStamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `value` varchar(45) NOT NULL, `unit` varchar(45) NOT NULL, `idCategory` int(11) NOT NULL, PRIMARY KEY (`idStatus`), UNIQUE KEY `idStatus_UNIQUE` (`idStatus`), KEY `timeStampIndex` (`timeStamp`), KEY `statusTocategory_idx` (`idCategory`), CONSTRAINT `statusTocategory` FOREIGN KEY (`idCategory`) REFERENCES `category` (`idCategory`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8$$ </code></pre> <p>So far I can get the basic google line chart on the webpage, but not with the values. I want it o show the Value based on time.</p> <p>This is the code I have so far:</p> <pre><code>&lt;head&gt; &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; google.load("visualization", "1", { packages : [ "corechart" ] }); google.setOnLoadCallback(drawChart); function drawChart(serverData) { var serverData = [ [ 'Year', 'Sales', 'Expenses' ], [ '2004', 1000, 400 ], [ '2005', 1170, 460 ], [ '2006', 660, 1120 ], [ '2007', 1030, 540 ] ]; var data = google.visualization.arrayToDataTable(serverData); var options = { title : 'Company Performance' }; var chart = new google.visualization.LineChart(document .getElementById('chart_div')); chart.draw(data, options); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; </code></pre> <p>How can I replace the Serverdata inputs with Value over time? (I don't have any knowledge in php) The google code is in javascript, but does it work to merge it with pure java or php code? Please help!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload