Home forums Using CanvasJS Can't calculate because of the thousand seperators 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 2 months, 3 weeks ago by  pater.