Forum Replies Created by pater

Viewing 1 post (of 1 total)
  • in reply to: Can't calculate because of the thousand seperators #25725

    thousand seperators are in points[2]
    I have tried to calculate points[1] and the chart works but not in points[3]

    function getDataPointsFromCSV(csv) {
      var dataPoints, csvLines, points;
      dataPoints = csvLines = points = [];
      
      csvLines = csv.split(/[\r?\n|\r|\n]+/);
      for (var i = 0; i < csvLines.length; i++)
        if (csvLines[i].length > 0) {
          points = csvLines[i].split(",");
          price = Math.log(points[3])
    • This reply was modified 5 years, 4 months ago by pater.
Viewing 1 post (of 1 total)