little adjustment in chart javascript