Kalina
Kalina

Reputation: 5594

How to make this type of graph in Android?

I've been looking into some graphing libraries but have only found ones for bar graphs, pie charts, scatter plots, and other things that are not what I'm looking for... How do I make a graph with directed lines of different thicknesses between labels, indicating the strength of the connection between the two? (Also, what is this called, more specifically than "graph"?)

Here's a sketch: graph

Upvotes: 1

Views: 570

Answers (1)

Deva
Deva

Reputation: 3949

You can try using the following for the circle

canvas.drawCircle(cx, cy, radius, paint);

for the lines you can try using the

canvas.drawLine(startX, startY, endX, endY, paint);

with different paint objects.

You can also have a look at the android.graphics.Path class.

Thanks!

Upvotes: 1

Related Questions