modified nextcharts.js