title: JSON inline Date converting
body: <p>I have D3 data graphic like here: <a href="https://www.metricsgraphicsjs.org/examples.htm#lines" rel="nofollow noreferrer">https://www.metricsgraphicsjs.org/examples.htm#lines</a> with example code </p>
  
  <pre><code>MG.data_graphic({
  title: "Singleton",
  description: "Handling a solitary data point.",
  data: [{'date': new Date('2015-03-05T21:00:00Z'), 'value': 12000}],
  width: 600,
  height: 200,
  right: 40,
  target: '#singleton'
  });
  </code></pre>
  
  <p>and difference is that I store data into database. But I have problem with displaying dates. My JSON data (pulled from MySQL) looks like this: </p>
  
  <pre><code>var data1 = [
   [
      {
       "date": "2018-04-28T13:42:55Z",
       "value": 20.8,
       "added": "2018-04-28T13:42:55Z"
      }
   ],
   [
      {
       "date": "2018-04-28T13:42:55Z",
       "value": 22.8,
       "added": "2018-04-28T13:42:55Z"
      }
   ],
   [
      {
      "date": "2018-04-28T13:42:55Z",
      "value": 23.9,
      "added": "2018-04-28T13:42:55Z"
      }
   ],
   [
      {
      "date": "2018-04-28T13:42:55Z",
      "value": 21.3,
      "added": "2018-04-28T13:42:55Z"
      }
   ]
  ]; 
  </code></pre>
  
  <p>When I try to display that data, it does not work, shows me errors like <code>&lt;path&gt; attribute d: Expected number, "MNaN,86.570057581…"</code> 
  But on other hand, if I set another variable for example </p>
  
  <pre><code> var data2 = [
                 [
                   {'date': new Date('2015-03-05T21:07:00Z'), 'value': 12000},
                   {'date': new Date('2015-03-05T21:10:00Z'), 'value': 5500},
                   {'date': new Date('2015-03-05T21:15:00Z'), 'value': 1000}
                  ],
                  [
                   {'date': new Date('2015-03-05T21:05:00Z'), 'value': 18000},
                   {'date': new Date('2015-03-05T21:07:00Z'), 'value': 15000},
                   {'date': new Date('2015-03-05T21:15:00Z'), 'value': 7000}
                  ]               
               ];
  </code></pre>
  
  <p>This second example works and I was wondering what this "new Date()" does to data. How can I "fix" first data1 array and store it in another variable with correct dates? - I did try this type of date:  Date Sat Apr 28 2018 13:56:55 GMT+0000 (UTC) but that did not help, did not work. Like this:</p>
  
  <pre><code>[
      {'date': 'Apr 28 2018 13:57:55 GMT+0000 (UTC)', 'value': 18000},
      {'date': 'Apr 28 2018 13:58:55 GMT+0000 (UTC)', 'value': 15000},
      {'date': 'Apr 28 2018 13:59:55 GMT+0000 (UTC)', 'value': 7000}
  ]
  </code></pre>
  
  <p>This did not work. Does "new Date()" converts date and time to integer or string or something else? </p>
  
  <p>I just want to find a way to change <code>data1</code> variable and convert its dates to proper values to be able to show them on graph.</p>
  
  <p>Thanks guys!</p>