0

Anyone having some experience with the GraphView library? I need to draw a chart, the closest approximation is something like that damage/distance chart on Battlelog:

enter image description here

So as assumed here, 0 - 9m the damage would be constant, then falling down and starting with 50m constant again. Example from the developer's page which I want to try just to see what it would look like:

  GraphViewSeries exampleSeries = new GraphViewSeries(new GraphViewData[] {  
                  new GraphViewData(1, 2.0d)  
                  , new GraphViewData(2, 1.5d)  
                  , new GraphViewData(3, 2.5d)  
                  , new GraphViewData(4, 1.0d)  
            });  

            GraphView graphView = new LineGraphView(  
                  getActivity() // context  
                  , "GraphViewDemo" // heading  
            );  
            graphView.addSeries(exampleSeries); // data 

GraphViewData cannot be resolved however. Any suggestions from those who used that library or possible alternatives to achieve what I need (see picture above)?

2 Answers 2

1

This is a common problem and can be solved by following these steps:

  1. Right click your project
  2. Go to Build Path
  3. Select Configure Build Path
  4. Go to Order and Export
  5. Check your JAR file's box, single click on it and move it up below Android's dependencies.
  6. Clean your project and try to run it.
Sign up to request clarification or add additional context in comments.

Comments

0

Oh well, that's by bad. Just looked inside the lib code and found out that I had to import GraphView to get it working, though the ADT didn't suggest to do so.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.