let lst_val ; let off_set = 0; function genTicks(value, index, ticks) { if (index == 0) { lst_val = ticks[0].value; off_set = (ticks[ticks.length - 1].value - ticks[0].value) / ticks.length; let gh = new Date(ticks[0].value); return gh.getDate() + " " + gh.getHours()+ ":" + gh.getMinutes()+ ":" + gh.getSeconds(); } lst_val = lst_val + off_set; let gh = new Date((lst_val + (off_set*index))); console.log("tt: ",lst_val); return gh.getDate() + " " +gh.getHours()+ ":" + gh.getMinutes()+ ":" + gh.getSeconds(); }la salida se ve así
tt: Sat Jan 01 2022 00:00:00 GMT+0500 (Pakistan Standard Time)9967333.3333333349967333.3333333349967333.3333333349967333.3333333349967333.3333333349967333.3333333349967333.3333333349967333.333333334Estoy tratando de sumar dos números. pero los está tratando como un número. Cualquier solución para esto.
Gracias de antemano.