i rewrote much of linegraph and bargraph,
i have given two examples of how they work in two seperate methods