-2

I need to create a graph that is similar to a Baccarat trend like this

enter image description here

What could be the best approach? I am thinking of using RecyclerView with GridLayout but I have no idea how to plot it this way. Any library that support this kind of graph?

Bitwise DEVS
  • 2,858
  • 4
  • 24
  • 67

1 Answers1

0

Try creating your own android View that can take some data and draw it

An example of your draw method could be

public void draw(Canvas canvas){
    //draw grid
    int spacing = 10; //costant cell size
    //use (height/rows) and (width/cols) as spacing to have costant cols and rows instead

    for(int y = 0; y<height; y+=spacing){
        canvas.drawLine(0,y,width,y,paint);
    }

    for(int x = 0; x<width; x+=spacing){
        canvas.drawLine(x, 0, x,height,paint);
    }
    //draw your data
}
Mirco0
  • 306
  • 1
  • 2
  • 8