Converted to a lib
Make some refactoring and added background grid drawing to ChartView