Skip to main content

Posts

Showing posts from September, 2014

Cloud-Based Driver Monitoring and Vehicular Diagnostic With OBD2 Telematics

Draw line graphs with AchartEngine in Android

AchartEngine provides an easy way of drawing both line and bar graphs in android platform. In here I describe drawing line graphs.  First need to add AchartEngine jar file to your android project. You can download it from here . If it is maven based project you can add the dependency and all details are in here . After you download the jar, add it into the libs folder and right click on the jar and Select Build the path as Figure 1 follows. Figure 1 - Configure Build Path If it is a maven based project, simply you have to build the project, will be downloaded the jar file to your project. Figure 2 - Graph class In above java class, you can refer easily to understand AchartEngine line graphs implementation. In here, used two pre-defined arrays as X and Y.  Then add those values to TimeSeries which is names as “Line1”   Then you need to add this TimeSeries to XYMultipleSeriesDatase t, then that dataset should add to the XYSeriesRender .  That ren