add features from https://github.com/FVANCOP/ChartNew.js