complete chartForPercent.js