fix js single line/bar chart bug