Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the last empty Array element in AmCharts.CSVToArray parse result. #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iamchenxin
Copy link

i only modified dataloader.js ,do not modified dataloader.min.js .
this problem is mainly caused by the last delimiter,many program,like libreoffice export csv with LF at the last end line.

the CSV in dataloader's examples is ended like this

Date,Open,High,Low,Close,Volume,Adj Close LF
2000-01-04,113.56,117.12,112.25,112.62,54119000,40.86 LF
2000-01-03,117.38,118.62,112.00,116.56,53228400,42.29

but csv file exported by some program like libreoffice is ended in this form

Date,Open,High,Low,Close,Volume,Adj Close LF
2000-01-04,113.56,117.12,112.25,112.62,54119000,40.86 LF
2000-01-03,117.38,118.62,112.00,116.56,53228400,42.29 LF

so in this case dataloader will genarate a element like [""] in the end of the array(arrData). This will lead incorrect data display at later processs.

    remove the last empty Array element in parse result.
    this problem is mainly caused by the last delimiter,many program,like libreoffice export csv with LF at the end line.
@martynasma
Copy link
Collaborator

Thanks. Before we merge this pull, can you send an example of such document so we can test?

You can send it to contact@amcharts.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants