Hi, it appears that your problem is actually very simple. For dates, we
expect the string format to look like the JavaScript Date constructor, so
for example, instead of "2014-10-20", you would have "Date(2014, 10, 20)".
Here's a jsfiddle that uses the correct date format:
http://jsfiddle.net/gfnwy3f1/

On Tue Nov 18 2014 at 4:21:51 PM Dom Laviola <[email protected]> wrote:

> I've been up so long on this I cant read the text anymore. Please help:
>
> *Here's the html:*
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <html>
>   <head>
>
>     <title>RealShortData.Com</title>
>     <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
>
>    <!--Load the Ajax API-->
>
>     <script type="text/javascript" src="https://www.google.com/jsapi
> "></script>
>     <script type="text/javascript"     src="
> http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";></script>
>
>     <script type="text/javascript">
>
>     google.load('visualization', '1',
> {'packages':['corechart','geochart','table']});
>
>     // Set a callback to run when the Google Visualization library is
> loaded.
>
>     google.setOnLoadCallback(drawChart);
>                                         function drawChart() {
>                                         var jsonData = $.ajax({
>                                         url: "functions/json30.php",
>                                         dataType: "json",
>                                         async: false
>                                         }).responseText;
>
>
>         var data = new google.visualization.DataTable(JSON.parse(jsonData);
>
>         var options = {
>                        title: 'Short Volume Percentage Breakdown'
>                        };
>
>         var chart = new
> google.visualization.LineChart(document.getElementById('chart_div'));
>             chart.draw(data, options);
>         }
>
> </script>
>
> <style type="text/css">
>
>     body {
>     background-color: #f0f0f2;
>     margin: 0;
>     padding: 0;
>     font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-
> serif;
>       }
>
>
>     a:link, a:visited {
>     color: #38488f;
> text-decoration: none;
> }
>
> </style>
> </head>
> <header>
>
> <divid="headerdiv">
>
>     <h1>RealShortData.com</h1>
>     <p>Coming Soon!</p>
> <img src="includes/bar1.png" style="float:center">
>
> </div>
> <br>
>  </br>
>  <divid="searchdiv">
> <h3>Short Volume &amp; Dark Pool Volume Search</h3>
>     <form method="GET"  action="<?php echo $_SERVER['PHP_SELF']; ?>" >
> Enter Ticker Symbol: <input type="text" name="query" />
> <input type="submit" value="Search" /></form>
> <img src="includes/bar1.png" style="float:center">
> </div>
> </header>
> <?php
> include("functions/json30.php");
> ?>
> <body>
>     <div id="chart_div" style="width: 900px; height: 500px;"></div>
> </body>
> </html>
>
>
> *And the php*
>
> <?php
>
> include("includes/connect.php");
> //include("linechart30.php");
> $query = $_GET['query'];
> $query = strtoupper($query);
> $query = htmlspecialchars($query);
> $query = mysql_real_escape_string($query);
>
> $chrt30dtsp= "SELECT  `date`,  `open_short_percent` ,
>  `total_short_percent`
> FROM  `tsp30d`
> WHERE  `symbol` =  '$query'  ORDER BY  `date` ASC";
> $result = mysql_query($chrt30dtsp);
> $table = array();
> $table['cols'] = array(
>                  array('label' => 'date', 'type' => 'date'),
>                         array('label' => 'Open Short Pct', 'type' =>
> 'number'),
>                         array('label' => 'Total Short Pct', 'type' =>
> 'number')
>             );
> $rows = array();
> while($r = mysql_fetch_assoc($result)) {
>               $temp = array();
>               $temp[] = array('v' => $r['date']);
>               $temp[] = array('v' => (float) $r['open_short_percent']);
>               $temp[] = array('v' => (float) $r['total_short_percent']);
>         $rows[] = array('c' => $temp);
>         }
> $table['rows'] = $rows;
>
> $jsonData = json_encode($table);
>
> echo $jsonData;
> ?>
>
>
> *and the result set:*
>
> RealShortData.com
>
> Coming Soon!
>
>
> Short Volume & Dark Pool Volume SearchEnter Ticker Symbol:  
> {"cols":[{"label":"date","type":"date"},{"label":"Open
> Short Pct","type":"number"},{"label":"Total Short
> Pct","type":"number"}],"rows":[{"c":[{"v":"2014-10-20"},{"v":50.28},{"v":43.92}]},{"c":[{"v":"2014-10-21"},{"v":48.84},{"v":52.51}]},{"c":[{"v":"2014-10-22"},{"v":62.18},{"v":52.88}]},{"c":[{"v":"2014-10-23"},{"v":74.94},{"v":138.07}]},{"c":[{"v":"2014-10-27"},{"v":78.98},{"v":16.18}]},{"c":[{"v":"2014-10-28"},{"v":54.11},{"v":39.22}]},{"c":[{"v":"2014-10-29"},{"v":58.77},{"v":57.33}]},{"c":[{"v":"2014-10-30"},{"v":43.02},{"v":41.5}]},{"c":[{"v":"2014-10-31"},{"v":61.03},{"v":54.9}]},{"c":[{"v":"2014-11-03"},{"v":52.6},{"v":69.08}]},{"c":[{"v":"2014-11-05"},{"v":66.67},{"v":58.63}]},{"c":[{"v":"2014-11-06"},{"v":48.44},{"v":47.81}]},{"c":[{"v":"2014-11-07"},{"v":48.57},{"v":43.04}]},{"c":[{"v":"2014-11-10"},{"v":53.45},{"v":42.73}]},{"c":[{"v":"2014-11-11"},{"v":62.89},{"v":64.35}]},{"c":[{"v":"2014-11-12"},{"v":67.48},{"v":69.58}]},{"c":[{"v":"2014-11-13"},{"v":58.34},{"v":62.46}]},{"c":[{"v":"2014-11-14"},{"v":54.91},{"v":54.93}]},{"c":[{"v":"2014-11-17"},{"v":48.75},{"v":36.2}]}]}
>
> I'm stuck and exhausted///please help//
>
> Thank you in advance.....
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization 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-visualization-api.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization 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-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to