You must be logged in to post your query.
Home › Forums › Chart Support › Can't calculate because of the thousand seperators
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])
@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
You must be logged in to reply to this topic. Login/Register