androidgraphandroid-graphview

android line graph using graph view library


I am using some android library which is in the link .. https://github.com/jjoe64/GraphView-Demos .. I tried with the realtime graph example , https://github.com/jjoe64/GraphView-Demos/blob/master/src/com/jjoe64/graphviewdemos/RealtimeGraph.java ... It works well for me but I have few problem x-y axis scale settings . When ever new data is load during re-drwaing the graph , all x-y axis scale value changes as per the in put data values .

I want to fix the y axis from the range 1 to 6 and x from 1 to 30 .. each with a increment scale of 1 .. This axis label values should be always fixed and the graph should change as per the in put data .. I need some way to the fixed labes.


Solution

  • did you try with manual y axis? E.g.

    graphView.setManualYAxisBounds(100, -100)