functions for chart for ajai