title: google charts json date react
body: <p>I've been trying to use Google charts with react. It works well, but I've moved the data from a local file to a mongoDB, which gives me a date-issue. 
  With my test-data I added a correct data-format in the google-charts using new Date(...). After moving the data, I'm getting the data from DB as JSON and this gives me a problem with the dates, that are just being printed as strings on my charts. </p>
  
  <p>I've read on google's chart docs, that they automatically rebuild the date object from JSON-strings, if I keep the data in the following order 'Date(2015, 3, 3)'.</p>
  
  <p>My data looks like this: </p>
  
  <pre><code>{ data: 
    [ [ 'Dato', 'Place1', 'Place2' ],
    [ 'Date(2015-9-2)', 100, 0 ],
    [ 'Date(2015-9-3)', 850, 0 ],
    [ 'Date(2015-9-4)', 1125, 0 ],
    [ 'Date(2015-9-5)', 0, 1900 ] ],
    path: 'Gennemsnitlig liggetid fordelt på kommuner' 
  }
  </code></pre>
  
  <p>It's still being interpreted as Strings in the google chart. I've seen other examples, where they're using Rows and Columns. Don't know if that's my mistake. Here's an example from Stackoverflow:</p>
  
  <pre><code> {"rows":[{"c":[{"v":"Date(year, month)"},{"v":"2095"}]}],"cols":
  [{"type":"datetime","label":"DTU"},{"type":"number","label":"COUNT"}]}
  </code></pre>
  
  <p>So, to sum it up. Everything works when using my testdata. The graph still works, when I'm getting data from DB. But the String dates I'm receiving from DB, isn't being recognized by the google charts as dates.</p>
  
  <p>Hoping for some help or feedback</p>
  
  <p>Regards</p>
  
  <p>Martin </p>