Hello, I am trying to map a duration as a line chart. Unfortunately I get the error "invalid Date" in the array.
JS: var besttimearr = row.besttime.split(":"); var besttimearr2 = besttimearr[1].split("."); var datestr = '0000, 00, 00, 00, 0' + besttimearr[0] + ', ' + besttimearr2[0] + ', ' + besttimearr2[1]; console.log(datestr); if (weather == 1) { data.addRow([ 'Lap: ' + row.Turn, new Date(datestr), Number(row.temprature) ]); } else { data.addRow([ 'Lap: ' + row.Turn, new Date(datestr) ]); } } var timeFormatter = new google.visualization.DateFormat({ pattern: "m:ss.SSS" }); timeFormatter.format(data, 1); var options = { pointSize: 5, pointShape: 'square', series: { 0: { targetAxisIndex: 0 }, 1: { targetAxisIndex: 1 } }, }; Console: (3) [{…}, {…}, {…}]0: {Turn: '1', besttime: '0:25.727', temprature: '13'}1: {Turn: '2', besttime: '0:24.633', temprature: '13'}2: {Turn: '3', besttime: '0:24.192', temprature: '0'}length: 3[[Prototype]]: Array(0) 0000, 00, 00, 00, 00, 25, 727 0000, 00, 00, 00, 00, 24, 633 0000, 00, 00, 00, 00, 24, 192 1. gvjs_M {cq: null, bf: Array(3), Wf: Array(3), Br: null, cache: Array(0), …} 1. Br: null 2. Wf: Array(3) 1. 0: 1. c: Array(3) 1. 0: {v: 'Lap: 1'} 2. 1: 1. f: "NaN:NaN.N" 2. v: Invalid Date Thanks for your Help! -- 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 google-visualization-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/058ef0a8-7488-4038-9375-ed26e9ee2566n%40googlegroups.com.