Questions tagged [android-graphview]

GraphView is a library for Android to programmatically create flexible and nice-looking diagrams.

GraphView is a library for Android to programmatically create flexible and nice-looking diagrams. It is easy to understand, to integrate and to customize it. At the moment there are three different types:

  • Line Charts
  • Bar Charts
  • Point Charts

Resources:

Exported .jar lib - https://github.com/jjoe64/GraphView/blob/master/public/graphview-3.1.jar?raw=true

GitGub Project Page - https://github.com/jjoe64/GraphView

Examples - https://github.com/jjoe64/GraphView-Demos

Website - http://www.android-graphview.org/

The library is compatible from android 1.6 - 5.0. More can be found on the project homepage.

454 questions
2
votes
1 answer

Maximal values of axes in a GraphView

I have the following code: LineGraphSeries series = new LineGraphSeries<>(arr); graphView.addSeries(series); graphView.getViewport().setMaxX(31); graphView.getViewport().setMaxY(150); …
Sergei Mikhailovskii
  • 2,100
  • 2
  • 21
  • 43
2
votes
0 answers

Customized Android GraphView x-axis date labels not displaying as per setNumHorizontalValues()

I attempt to show a tersely formatted date/time on the x-axis in a graphview chart. As per the API Code examples, I set HumanRounding to false when using using a date formatter on that axis. I'm also setting the NumHorizontalLabels to 3 in order to…
RBH
  • 261
  • 1
  • 10
2
votes
0 answers

How to change color of the DataPoint in LineGraphSeries with highest/lowest Y value?

I have array of DataPoints with x, y coords. I want to highlight DataPoint with highest/lowest Y value on GraphView. I can extract highest/lowest Y value by: lineGraphSeries.getHighestValueY or lineGraphSeries.getLowestValueY. But what I need is to…
martin1337
  • 2,384
  • 6
  • 38
  • 85
2
votes
0 answers

GraphView wrong x axis viewport

I'm trying to make a graph view with jjoe64's GraphView library with dates on the x-axis and numbers on the y-axis, but I'm getting some troubles... DataPoint wants Date or Double as input. The documentation says it automatically casts Dates do…
Jannik
  • 43
  • 4
2
votes
3 answers

Cannot use Graph View library

I'm trying to use graph view library in the android studio to create a graph. I've learned that I need to add the following line of code into the build. gradle file under the app directory implementation 'com.jjoe64:graphview:4.2.2' But the moment…
pamo
  • 111
  • 2
  • 13
2
votes
0 answers

Android GraphView and Mediaplayer falling out of synchronization

I'm working on a project, where I need to show the pitches of the words (from the song) in a GraphView. I wrote a program that would get the pitches from a song and create a .txt file from it. Then I wrote a class, that reads the file and creates a…
2
votes
1 answer

Display datapoint value above datapoint in GraphView

I'm using GraphView for Android, and i'm trying to display the datapoint value above said datapoint in case of an onClick event. Currently, i'm using series.setOnDataPointTapListener(new OnDataPointTapListener() { @Override …
Nabila K
  • 21
  • 3
2
votes
0 answers

Does Graphview allow setting ticks on x- or y-axis?

I want to make unequal tick marks on y-axis. Graphview generally gives .setNumVerticalLabales(int) and divides the minY and maxY based on the int number given. But I want to mark unequal ticks based on the frequency numbers generated. For example:…
2
votes
2 answers

Getting always IllegalStateException error when trying to obtain bitmap from view

I am trying to obtain the bitmap from a GraphView in order to not generate twice the same graph. I am continously getting the the following error (despite having the hardwareAccelerated=true): java.lang.IllegalStateException: GraphView must be used…
nlopez
  • 351
  • 1
  • 13
2
votes
2 answers

Android Real Time Graph app crashing. Possible multi-threading issue

I'm having a problem with a college project in which I need to display real-time readings from an arduino on an android device. The arduino and Bluetooth link are working fine. On the android side, I start a new thread to retrieve these values and…
seg
  • 31
  • 8
2
votes
3 answers

Getting IllegalStateException when trying to take snapshot of the graph for https://github.com/appsthatmatter/GraphView

I'm trying to take snapshot of the GraphView but it gives an error "GraphView must be used in hardware accelerated mode." I'm using the following code to take snapshot Bitmap bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(),…
kalpeshdeo
  • 1,236
  • 1
  • 11
  • 16
2
votes
2 answers

How to add tap listener on data point?

I want to a add tap listener on a data point in the graph view in Android Studio. There is a problem in my java code that says: can't resolve method get Activity() in last line of codes. Help me resolve my problem. Here is my code: package…
a.seif
  • 124
  • 2
  • 8
2
votes
1 answer

Trouble in saving GraphView as image

I am trying to save a graphView as an image. There are two things that are happening which are not expected. First thing is that the file is not getting created in sd card, Instead it is getting created in internal storage of the phone. Second is…
sp9
  • 21
  • 5
2
votes
0 answers

Fill color between two series in a LineGraphSeries of Graphview android

I have created a line graph using GraphView demo.But I need to fill the areas only between the lines with a specific colour. This is what I want to achieve: Error band for a linegraphseries. or Fill colour between two series in a LineGraphSeries of…
Ashwini
  • 21
  • 3
2
votes
0 answers

Android jjoe64 graphiew linegraph - single line with multiple colors

I am using https://github.com/jjoe64/GraphView for a real-time android graph application. I am using 4.1.0 library version. I am using graph view to display a parameter (battery voltage) and change the color of line graph based on a certain value.…
Rav Brar
  • 21
  • 2