jjoe64 / GraphView

Android Graph Library for creating zoomable and scrollable line and bar graphs.
https://github.com/jjoe64/GraphView/wiki
Other
2.76k stars 811 forks source link

Real time graph on Android API 16 no scrolling to end, no drawing of the graph #39

Closed MarcDahlem closed 11 years ago

MarcDahlem commented 11 years ago

Hi,

like I wrote you on google+ was the graphview not updating when adding data in realtime. The android version used was 4.1.1 on a Samsung Galaxy S3 LTE.

I tested it now with the emulator on the versions 2.3.3 (API 10), 4.0.3 (API 15) and 4.2 (API 17): On this APIs is the graph updated like expected.

Only when running a emulater with API 16 (4.1.2) or the phone (4.1.1) is the graph not drawn.

The strange thing is, that it is updating the labels on the y axis (but not on the x), and thereby not drawing the graph. It updates the graph as soon as one clicks on it.

Attached are pictures that show the graph before (output) and after clicking (expected output).

\BR Marc output output_expected

jjoe64 commented 11 years ago

seems that invalide() is missing...

Lauszus commented 11 years ago

I believe that my commit fixes this issue: https://github.com/Lauszus/GraphView/commit/6c9fa1c6317f3c2dc93c5edf0847a242c65dc2df Which is part of my pull request: https://github.com/jjoe64/GraphView/pull/37

aleksanderlech commented 11 years ago

Any workaround for that? I assume that current dev version is free from this defect right?

babaille commented 11 years ago

I tested the method proposed by "Lauszus", it works fine. Now, real time graph is updated automatically after "append". Thanks a lot.

Lauszus commented 11 years ago

@babaille glad to hear my commit was helpful - I was staring to think that I was the only one having the issue :) Hopefully the pull request will be merged soon then.

jjoe64 commented 11 years ago

pull request #37 is merged, so this issue should be fixed