rename test for chart partial and improve the code