The code has ben refactored and New Chart Version