Home forums Chart Support Can't calculate because of the thousand seperators

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #25724

    Hi. I am using canvasjs to calculate the csv data and display them in a line chart. However, the line chart can’t display the calculation because of the thousand seperators in my csv file. If I remove those seperator in csv file column, the line chart works normal. So, what can I do? Thankyou.


    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 1 year, 8 months ago by pater.


    Can you kindly share sample project along with sample CSV over Google-Drive or Onedrive so that we can look into your code, understand the scenario better and help you out?

    Manoj Mohan
    Team CanvasJS

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.